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