]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0408]: variable `a` is not bound in all patterns |
416331ca | 2 | --> $DIR/resolve-inconsistent-names.rs:13:12 |
ff7c6d11 | 3 | | |
532ac7d7 | 4 | LL | a | b => {} |
ff7c6d11 XL |
5 | | - ^ pattern doesn't bind `a` |
6 | | | | |
7 | | variable not in all patterns | |
8 | ||
9 | error[E0408]: variable `b` is not bound in all patterns | |
416331ca | 10 | --> $DIR/resolve-inconsistent-names.rs:13:8 |
ff7c6d11 | 11 | | |
532ac7d7 | 12 | LL | a | b => {} |
ff7c6d11 XL |
13 | | ^ - variable not in all patterns |
14 | | | | |
15 | | pattern doesn't bind `b` | |
16 | ||
add651ee FG |
17 | error[E0408]: variable `c` is not bound in all patterns |
18 | --> $DIR/resolve-inconsistent-names.rs:19:9 | |
19 | | | |
20 | LL | (A, B) | (ref B, c) | (c, A) => () | |
21 | | ^^^^^^ - - variable not in all patterns | |
22 | | | | | |
23 | | | variable not in all patterns | |
24 | | pattern doesn't bind `c` | |
25 | ||
416331ca XL |
26 | error[E0408]: variable `A` is not bound in all patterns |
27 | --> $DIR/resolve-inconsistent-names.rs:19:18 | |
28 | | | |
29 | LL | (A, B) | (ref B, c) | (c, A) => () | |
30 | | - ^^^^^^^^^^ - variable not in all patterns | |
31 | | | | | |
32 | | | pattern doesn't bind `A` | |
33 | | variable not in all patterns | |
34 | | | |
04454e1e | 35 | help: if you meant to match on unit variant `E::A`, use the full path in the pattern |
416331ca | 36 | | |
04454e1e FG |
37 | LL | (E::A, B) | (ref B, c) | (c, A) => () |
38 | | ~~~~ | |
416331ca XL |
39 | |
40 | error[E0408]: variable `B` is not bound in all patterns | |
41 | --> $DIR/resolve-inconsistent-names.rs:19:31 | |
42 | | | |
43 | LL | (A, B) | (ref B, c) | (c, A) => () | |
44 | | - - ^^^^^^ pattern doesn't bind `B` | |
45 | | | | | |
46 | | | variable not in all patterns | |
47 | | variable not in all patterns | |
48 | ||
74b04a01 | 49 | error[E0409]: variable `B` is bound inconsistently across alternatives separated by `|` |
416331ca XL |
50 | --> $DIR/resolve-inconsistent-names.rs:19:23 |
51 | | | |
52 | LL | (A, B) | (ref B, c) | (c, A) => () | |
53 | | - ^ bound in different ways | |
54 | | | | |
55 | | first binding | |
56 | ||
57 | error[E0408]: variable `CONST1` is not bound in all patterns | |
f2b60f7d | 58 | --> $DIR/resolve-inconsistent-names.rs:31:23 |
416331ca XL |
59 | | |
60 | LL | (CONST1, _) | (_, Const2) => () | |
61 | | ------ ^^^^^^^^^^^ pattern doesn't bind `CONST1` | |
62 | | | | |
63 | | variable not in all patterns | |
64 | | | |
04454e1e FG |
65 | note: you might have meant to match on constant `m::CONST1`, which exists but is inaccessible |
66 | --> $DIR/resolve-inconsistent-names.rs:6:5 | |
416331ca | 67 | | |
04454e1e FG |
68 | LL | const CONST1: usize = 10; |
69 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible | |
416331ca XL |
70 | |
71 | error[E0408]: variable `Const2` is not bound in all patterns | |
f2b60f7d | 72 | --> $DIR/resolve-inconsistent-names.rs:31:9 |
416331ca XL |
73 | | |
74 | LL | (CONST1, _) | (_, Const2) => () | |
75 | | ^^^^^^^^^^^ ------ variable not in all patterns | |
76 | | | | |
77 | | pattern doesn't bind `Const2` | |
78 | | | |
04454e1e | 79 | help: if you meant to match on constant `m::Const2`, use the full path in the pattern |
416331ca | 80 | | |
04454e1e FG |
81 | LL | (CONST1, _) | (_, m::Const2) => () |
82 | | ~~~~~~~~~ | |
416331ca XL |
83 | |
84 | error[E0308]: mismatched types | |
85 | --> $DIR/resolve-inconsistent-names.rs:19:19 | |
86 | | | |
dfeec247 XL |
87 | LL | match x { |
88 | | - this expression has type `(E, E)` | |
416331ca | 89 | LL | (A, B) | (ref B, c) | (c, A) => () |
9ffffee4 | 90 | | - ^^^^^ expected `E`, found `&E` |
74b04a01 XL |
91 | | | |
92 | | first introduced with type `E` here | |
93 | | | |
94 | = note: in the same arm, a binding must have the same type in all alternatives | |
f2b60f7d FG |
95 | help: consider removing `ref` |
96 | | | |
97 | LL - (A, B) | (ref B, c) | (c, A) => () | |
98 | LL + (A, B) | (B, c) | (c, A) => () | |
99 | | | |
416331ca XL |
100 | |
101 | error: aborting due to 9 previous errors | |
ff7c6d11 | 102 | |
416331ca XL |
103 | Some errors have detailed explanations: E0308, E0408, E0409. |
104 | For more information about an error, try `rustc --explain E0308`. |