rust/tests/ui/suggestions/suppress-consider-slicing-issue-120605.stderr
Esteban Küber 8ea1066fe6 Tweak slice and as_deref suggestion span
Use multispan suggestion.
2024-07-04 05:50:21 +00:00

27 lines
1.0 KiB
Plaintext

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 {
| ^^^^^^^^^^^^^^^^^^ pattern cannot match with input type `Vec<Struct>`
|
help: consider slicing here
|
LL | if let [Struct { a: [] }] = &self.a[..] {
| ++++
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`.