| // Regression test for #87017. |
| fn foo() -> Vec<i32> { vec![1, 2, 3] } |
| if let [_, _, _] = foo()[..] {} |
| //~^ ERROR: expected an array or slice |
| //~| HELP: consider slicing here |
| if let [] = &foo()[..] {} |
| //~^ ERROR: expected an array or slice |
| //~| HELP: consider slicing here |
| //~^ ERROR: expected an array or slice |
| //~| HELP: consider slicing here |
| //~^ HELP: consider slicing here |
| //~^ ERROR: expected an array or slice |
| let [..] = vec![1, 2, 3][..]; |
| //~^ ERROR: expected an array or slice |
| //~| HELP: consider slicing here |