@@ -2,42 +2,56 @@ error[E0529]: expected an array or slice, found `Vec<i32>`
22 --> $DIR/pattern-slice-vec.rs:8:12
33 |
44LL | if let [_, _, _] = foo() {}
5- | ^^^^^^^^^ ----- help: consider slicing here: `foo()[..]`
6- | |
7- | pattern cannot match with input type `Vec<i32>`
5+ | ^^^^^^^^^ pattern cannot match with input type `Vec<i32>`
6+ |
7+ help: consider slicing here
8+ |
9+ LL | if let [_, _, _] = foo()[..] {}
10+ | ++++
811
912error[E0529]: expected an array or slice, found `Vec<i32>`
1013 --> $DIR/pattern-slice-vec.rs:12:12
1114 |
1215LL | if let [] = &foo() {}
13- | ^^ ------ help: consider slicing here: `&foo()[..]`
14- | |
15- | pattern cannot match with input type `Vec<i32>`
16+ | ^^ pattern cannot match with input type `Vec<i32>`
17+ |
18+ help: consider slicing here
19+ |
20+ LL | if let [] = &foo()[..] {}
21+ | ++++
1622
1723error[E0529]: expected an array or slice, found `Vec<i32>`
1824 --> $DIR/pattern-slice-vec.rs:16:12
1925 |
2026LL | if let [] = foo() {}
21- | ^^ ----- help: consider slicing here: `foo()[..]`
22- | |
23- | pattern cannot match with input type `Vec<i32>`
27+ | ^^ pattern cannot match with input type `Vec<i32>`
28+ |
29+ help: consider slicing here
30+ |
31+ LL | if let [] = foo()[..] {}
32+ | ++++
2433
2534error[E0529]: expected an array or slice, found `Vec<_>`
2635 --> $DIR/pattern-slice-vec.rs:23:9
2736 |
28- LL | match &v {
29- | -- help: consider slicing here: `&v[..]`
30- LL |
3137LL | [5] => {}
3238 | ^^^ pattern cannot match with input type `Vec<_>`
39+ |
40+ help: consider slicing here
41+ |
42+ LL | match &v[..] {
43+ | ++++
3344
3445error[E0529]: expected an array or slice, found `Vec<{integer}>`
3546 --> $DIR/pattern-slice-vec.rs:28:9
3647 |
3748LL | let [..] = vec![1, 2, 3];
38- | ^^^^ ------------- help: consider slicing here: `vec![1, 2, 3][..]`
39- | |
40- | pattern cannot match with input type `Vec<{integer}>`
49+ | ^^^^ pattern cannot match with input type `Vec<{integer}>`
50+ |
51+ help: consider slicing here
52+ |
53+ LL | let [..] = vec![1, 2, 3][..];
54+ | ++++
4155
4256error: aborting due to 5 previous errors
4357
0 commit comments