1 error[E0308]: mismatched types
2 --> $DIR/match-ergonomics.rs:4:10
5 | ------ this expression has type `&[i32]`
9 | expected `i32`, found reference
10 | help: you can probably remove the explicit borrow: `v`
12 = note: expected type `i32`
15 error[E0529]: expected an array or slice, found `Vec<i32>`
16 --> $DIR/match-ergonomics.rs:8:9
19 | ^^^^ pattern cannot match with input type `Vec<i32>`
21 error[E0529]: expected an array or slice, found `Vec<i32>`
22 --> $DIR/match-ergonomics.rs:20:9
25 | ^^^ pattern cannot match with input type `Vec<i32>`
27 error[E0308]: mismatched types
28 --> $DIR/match-ergonomics.rs:29:9
31 | - this expression has type `i32`
35 | expected `i32`, found reference
36 | help: you can probably remove the explicit borrow: `v`
38 = note: expected type `i32`
41 error[E0308]: mismatched types
42 --> $DIR/match-ergonomics.rs:40:13
44 LL | if let [&v] = &x[..] {}
45 | ^^ ------ this expression has type `&[i32]`
47 | expected `i32`, found reference
48 | help: you can probably remove the explicit borrow: `v`
50 = note: expected type `i32`
53 error: aborting due to 5 previous errors
55 Some errors have detailed explanations: E0308, E0529.
56 For more information about an error, try `rustc --explain E0308`.