File: slice-pat-type-mismatches.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (34 lines) | stat: -rw-r--r-- 1,145 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
error[E0425]: cannot find value `does_not_exist` in this scope
  --> $DIR/slice-pat-type-mismatches.rs:26:11
   |
LL |     match does_not_exist {
   |           ^^^^^^^^^^^^^^ not found in this scope

error[E0529]: expected an array or slice, found `String`
  --> $DIR/slice-pat-type-mismatches.rs:3:9
   |
LL |         ['f', 'o', ..] => {}
   |         ^^^^^^^^^^^^^^ pattern cannot match with input type `String`

error[E0527]: pattern requires 1 element but array has 3
  --> $DIR/slice-pat-type-mismatches.rs:18:9
   |
LL |         [0] => {}
   |         ^^^ expected 3 elements

error[E0528]: pattern requires at least 4 elements but array has 3
  --> $DIR/slice-pat-type-mismatches.rs:23:9
   |
LL |         [0, 1, 2, 3, x @ ..] => {}
   |         ^^^^^^^^^^^^^^^^^^^^ pattern cannot match array of 3 elements

error[E0282]: type annotations needed
  --> $DIR/slice-pat-type-mismatches.rs:34:9
   |
LL |         [] => {}
   |         ^^ cannot infer type

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0282, E0425, E0527, E0528, E0529.
For more information about an error, try `rustc --explain E0282`.