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 | - help: consider slicing here: `x[..]`
21 | ^^^^ pattern cannot match with input type `Vec<i32>`
23 error[E0529]: expected an array or slice, found `Vec<i32>`
24 --> $DIR/match-ergonomics.rs:20:9
27 | - help: consider slicing here: `x[..]`
29 | ^^^ pattern cannot match with input type `Vec<i32>`
31 error[E0308]: mismatched types
32 --> $DIR/match-ergonomics.rs:29:9
35 | - this expression has type `i32`
39 | expected `i32`, found reference
40 | help: you can probably remove the explicit borrow: `v`
42 = note: expected type `i32`
45 error[E0308]: mismatched types
46 --> $DIR/match-ergonomics.rs:40:13
48 LL | if let [&v] = &x[..] {}
49 | ^^ ------ this expression has type `&[i32]`
51 | expected `i32`, found reference
52 | help: you can probably remove the explicit borrow: `v`
54 = note: expected type `i32`
57 error: aborting due to 5 previous errors
59 Some errors have detailed explanations: E0308, E0529.
60 For more information about an error, try `rustc --explain E0308`.