1 error[E0308]: mismatched types
2 --> $DIR/match-ergonomics.rs:4:10
5 | ------ this expression has type `&[i32]`
7 | ^^ expected `i32`, found reference
9 = note: expected type `i32`
11 help: consider removing `&` from the pattern
17 error[E0529]: expected an array or slice, found `Vec<i32>`
18 --> $DIR/match-ergonomics.rs:8:9
21 | - help: consider slicing here: `x[..]`
23 | ^^^^ pattern cannot match with input type `Vec<i32>`
25 error[E0529]: expected an array or slice, found `Vec<i32>`
26 --> $DIR/match-ergonomics.rs:20:9
29 | - help: consider slicing here: `x[..]`
31 | ^^^ pattern cannot match with input type `Vec<i32>`
33 error[E0308]: mismatched types
34 --> $DIR/match-ergonomics.rs:29:9
37 | - this expression has type `i32`
39 | ^^ expected `i32`, found reference
41 = note: expected type `i32`
43 help: consider removing `&` from the pattern
49 error[E0308]: mismatched types
50 --> $DIR/match-ergonomics.rs:40:13
52 LL | if let [&v] = &x[..] {}
53 | ^^ ------ this expression has type `&[i32]`
55 | expected `i32`, found reference
57 = note: expected type `i32`
59 help: consider removing `&` from the pattern
61 LL - if let [&v] = &x[..] {}
62 LL + if let [v] = &x[..] {}
65 error: aborting due to 5 previous errors
67 Some errors have detailed explanations: E0308, E0529.
68 For more information about an error, try `rustc --explain E0308`.