mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
23 lines
1,005 B
Text
23 lines
1,005 B
Text
error[E0529]: expected an array or slice, found `Vec<Struct>`
|
|
--> $DIR/suppress-consider-slicing-issue-120605.rs:7:16
|
|
|
|
|
LL | if let [Struct { a: [] }] = &self.a {
|
|
| ^^^^^^^^^^^^^^^^^^ ------- help: consider slicing here: `&self.a[..]`
|
|
| |
|
|
| pattern cannot match with input type `Vec<Struct>`
|
|
|
|
error[E0529]: expected an array or slice, found `Vec<Struct>`
|
|
--> $DIR/suppress-consider-slicing-issue-120605.rs:7:29
|
|
|
|
|
LL | if let [Struct { a: [] }] = &self.a {
|
|
| ^^ pattern cannot match with input type `Vec<Struct>`
|
|
|
|
error[E0529]: expected an array or slice, found `Vec<Struct>`
|
|
--> $DIR/suppress-consider-slicing-issue-120605.rs:13:29
|
|
|
|
|
LL | if let [Struct { a: [] }] = &self.a[..] {
|
|
| ^^ pattern cannot match with input type `Vec<Struct>`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0529`.
|