]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/pattern-slice-vec.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / pattern-slice-vec.stderr
1 error[E0529]: expected an array or slice, found `Vec<i32>`
2   --> $DIR/pattern-slice-vec.rs:8:12
3    |
4 LL |     if let [_, _, _] = foo() {}
5    |            ^^^^^^^^^   ----- help: consider slicing here: `foo()[..]`
6    |            |
7    |            pattern cannot match with input type `Vec<i32>`
8
9 error[E0529]: expected an array or slice, found `Vec<i32>`
10   --> $DIR/pattern-slice-vec.rs:12:12
11    |
12 LL |     if let [] = &foo() {}
13    |            ^^   ------ help: consider slicing here: `&foo()[..]`
14    |            |
15    |            pattern cannot match with input type `Vec<i32>`
16
17 error[E0529]: expected an array or slice, found `Vec<i32>`
18   --> $DIR/pattern-slice-vec.rs:16:12
19    |
20 LL |     if let [] = foo() {}
21    |            ^^   ----- help: consider slicing here: `foo()[..]`
22    |            |
23    |            pattern cannot match with input type `Vec<i32>`
24
25 error[E0529]: expected an array or slice, found `Vec<_>`
26   --> $DIR/pattern-slice-vec.rs:23:9
27    |
28 LL |     match &v {
29    |           -- help: consider slicing here: `&v[..]`
30 LL |
31 LL |         [5] => {}
32    |         ^^^ pattern cannot match with input type `Vec<_>`
33
34 error[E0529]: expected an array or slice, found `Vec<{integer}>`
35   --> $DIR/pattern-slice-vec.rs:28:9
36    |
37 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}>`
41
42 error: aborting due to 5 previous errors
43
44 For more information about this error, try `rustc --explain E0529`.