1 error[E0409]: variable `y` is bound inconsistently across alternatives separated by `|`
2 --> $DIR/suggest-adding-or-removing-ref-for-binding-pattern.rs:11:43
4 LL | Blah::A(_, x, ref y) | Blah::B(x, y) => {}
5 | - first binding ^ bound in different ways
7 error[E0409]: variable `y` is bound inconsistently across alternatives separated by `|`
8 --> $DIR/suggest-adding-or-removing-ref-for-binding-pattern.rs:17:43
10 LL | Blah::A(_, x, y) | Blah::B(x, ref y) => {}
11 | - first binding ^ bound in different ways
13 error[E0308]: mismatched types
14 --> $DIR/suggest-adding-or-removing-ref-for-binding-pattern.rs:11:43
16 LL | match Blah::A(1, 1, 2) {
17 | ---------------- this expression has type `Blah`
18 LL | Blah::A(_, x, ref y) | Blah::B(x, y) => {}
19 | ----- ^ expected `&usize`, found `usize`
21 | first introduced with type `&usize` here
23 = note: in the same arm, a binding must have the same type in all alternatives
24 help: consider adding `ref`
26 LL | Blah::A(_, x, ref y) | Blah::B(x, ref y) => {}
29 error[E0308]: mismatched types
30 --> $DIR/suggest-adding-or-removing-ref-for-binding-pattern.rs:17:39
32 LL | match Blah::A(1, 1, 2) {
33 | ---------------- this expression has type `Blah`
34 LL | Blah::A(_, x, y) | Blah::B(x, ref y) => {}
35 | - ^^^^^ expected `usize`, found `&usize`
37 | first introduced with type `usize` here
39 = note: in the same arm, a binding must have the same type in all alternatives
40 help: consider removing `ref`
42 LL - Blah::A(_, x, y) | Blah::B(x, ref y) => {}
43 LL + Blah::A(_, x, y) | Blah::B(x, y) => {}
46 error: aborting due to 4 previous errors
48 Some errors have detailed explanations: E0308, E0409.
49 For more information about an error, try `rustc --explain E0308`.