]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/match-ergonomics.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / suggestions / match-ergonomics.stderr
1 error[E0308]: mismatched types
2 --> $DIR/match-ergonomics.rs:4:10
3 |
4 LL | match &x[..] {
5 | ------ this expression has type `&[i32]`
6 LL | [&v] => {},
7 | ^^
8 | |
9 | expected `i32`, found reference
10 | help: you can probably remove the explicit borrow: `v`
11 |
12 = note: expected type `i32`
13 found reference `&_`
14
15 error[E0529]: expected an array or slice, found `Vec<i32>`
16 --> $DIR/match-ergonomics.rs:8:9
17 |
18 LL | [&v] => {},
19 | ^^^^ pattern cannot match with input type `Vec<i32>`
20
21 error[E0529]: expected an array or slice, found `Vec<i32>`
22 --> $DIR/match-ergonomics.rs:20:9
23 |
24 LL | [v] => {},
25 | ^^^ pattern cannot match with input type `Vec<i32>`
26
27 error[E0308]: mismatched types
28 --> $DIR/match-ergonomics.rs:29:9
29 |
30 LL | match y {
31 | - this expression has type `i32`
32 LL | &v => {},
33 | ^^
34 | |
35 | expected `i32`, found reference
36 | help: you can probably remove the explicit borrow: `v`
37 |
38 = note: expected type `i32`
39 found reference `&_`
40
41 error[E0308]: mismatched types
42 --> $DIR/match-ergonomics.rs:40:13
43 |
44 LL | if let [&v] = &x[..] {}
45 | ^^ ------ this expression has type `&[i32]`
46 | |
47 | expected `i32`, found reference
48 | help: you can probably remove the explicit borrow: `v`
49 |
50 = note: expected type `i32`
51 found reference `&_`
52
53 error: aborting due to 5 previous errors
54
55 Some errors have detailed explanations: E0308, E0529.
56 For more information about an error, try `rustc --explain E0308`.