]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/slice-pat-type-mismatches.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / array-slice-vec / slice-pat-type-mismatches.stderr
1 error[E0425]: cannot find value `does_not_exist` in this scope
2   --> $DIR/slice-pat-type-mismatches.rs:26:11
3    |
4 LL |     match does_not_exist {
5    |           ^^^^^^^^^^^^^^ not found in this scope
6
7 error[E0529]: expected an array or slice, found `String`
8   --> $DIR/slice-pat-type-mismatches.rs:3:9
9    |
10 LL |         ['f', 'o', ..] => {}
11    |         ^^^^^^^^^^^^^^ pattern cannot match with input type `String`
12
13 error[E0527]: pattern requires 1 element but array has 3
14   --> $DIR/slice-pat-type-mismatches.rs:18:9
15    |
16 LL |         [0] => {},
17    |         ^^^ expected 3 elements
18
19 error[E0528]: pattern requires at least 4 elements but array has 3
20   --> $DIR/slice-pat-type-mismatches.rs:23:9
21    |
22 LL |         [0, 1, 2, 3, x @ ..] => {}
23    |         ^^^^^^^^^^^^^^^^^^^^ pattern cannot match array of 3 elements
24
25 error[E0282]: type annotations needed
26   --> $DIR/slice-pat-type-mismatches.rs:34:9
27    |
28 LL |         [] => {}
29    |         ^^ cannot infer type
30
31 error: aborting due to 5 previous errors
32
33 Some errors have detailed explanations: E0282, E0425, E0527, E0528, E0529.
34 For more information about an error, try `rustc --explain E0282`.