@@ -2,42 +2,56 @@ error[E0529]: expected an array or slice, found `Vec<i32>`
2
2
--> $DIR/pattern-slice-vec.rs:8:12
3
3
|
4
4
LL | 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
+ | ++++
8
11
9
12
error[E0529]: expected an array or slice, found `Vec<i32>`
10
13
--> $DIR/pattern-slice-vec.rs:12:12
11
14
|
12
15
LL | 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
+ | ++++
16
22
17
23
error[E0529]: expected an array or slice, found `Vec<i32>`
18
24
--> $DIR/pattern-slice-vec.rs:16:12
19
25
|
20
26
LL | 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
+ | ++++
24
33
25
34
error[E0529]: expected an array or slice, found `Vec<_>`
26
35
--> $DIR/pattern-slice-vec.rs:23:9
27
36
|
28
- LL | match &v {
29
- | -- help: consider slicing here: `&v[..]`
30
- LL |
31
37
LL | [5] => {}
32
38
| ^^^ pattern cannot match with input type `Vec<_>`
39
+ |
40
+ help: consider slicing here
41
+ |
42
+ LL | match &v[..] {
43
+ | ++++
33
44
34
45
error[E0529]: expected an array or slice, found `Vec<{integer}>`
35
46
--> $DIR/pattern-slice-vec.rs:28:9
36
47
|
37
48
LL | 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
+ | ++++
41
55
42
56
error: aborting due to 5 previous errors
43
57
0 commit comments