]> git.proxmox.com Git - rustc.git/blame - src/test/ui/array-slice-vec/slice-pat-type-mismatches.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / array-slice-vec / slice-pat-type-mismatches.stderr
CommitLineData
b7449926 1error[E0425]: cannot find value `does_not_exist` in this scope
dfeec247 2 --> $DIR/slice-pat-type-mismatches.rs:26:11
b7449926 3 |
532ac7d7 4LL | match does_not_exist {
b7449926
XL
5 | ^^^^^^^^^^^^^^ not found in this scope
6
1b1a35ee 7error[E0529]: expected an array or slice, found `String`
dfeec247 8 --> $DIR/slice-pat-type-mismatches.rs:3:9
b7449926
XL
9 |
10LL | ['f', 'o', ..] => {}
1b1a35ee 11 | ^^^^^^^^^^^^^^ pattern cannot match with input type `String`
b7449926 12
e1599b0c 13error[E0527]: pattern requires 1 element but array has 3
dfeec247 14 --> $DIR/slice-pat-type-mismatches.rs:18:9
b7449926 15 |
532ac7d7 16LL | [0] => {},
b7449926
XL
17 | ^^^ expected 3 elements
18
19error[E0528]: pattern requires at least 4 elements but array has 3
dfeec247 20 --> $DIR/slice-pat-type-mismatches.rs:23:9
b7449926 21 |
416331ca
XL
22LL | [0, 1, 2, 3, x @ ..] => {}
23 | ^^^^^^^^^^^^^^^^^^^^ pattern cannot match array of 3 elements
b7449926
XL
24
25error[E0282]: type annotations needed
dfeec247 26 --> $DIR/slice-pat-type-mismatches.rs:34:9
b7449926 27 |
532ac7d7 28LL | [] => {}
b7449926 29 | ^^ cannot infer type
b7449926
XL
30
31error: aborting due to 5 previous errors
32
48663c56 33Some errors have detailed explanations: E0282, E0425, E0527, E0528, E0529.
b7449926 34For more information about an error, try `rustc --explain E0282`.