]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/resolve-inconsistent-names.stderr
Auto merge of #100315 - compiler-errors:norm-ct-in-proj, r=lcnr
[rust.git] / src / test / ui / resolve / resolve-inconsistent-names.stderr
1 error[E0408]: variable `a` is not bound in all patterns
2   --> $DIR/resolve-inconsistent-names.rs:13:12
3    |
4 LL |        a | b => {}
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
10   --> $DIR/resolve-inconsistent-names.rs:13:8
11    |
12 LL |        a | b => {}
13    |        ^   - variable not in all patterns
14    |        |
15    |        pattern doesn't bind `b`
16
17 error[E0408]: variable `A` is not bound in all patterns
18   --> $DIR/resolve-inconsistent-names.rs:19:18
19    |
20 LL |         (A, B) | (ref B, c) | (c, A) => ()
21    |          -       ^^^^^^^^^^       - variable not in all patterns
22    |          |       |
23    |          |       pattern doesn't bind `A`
24    |          variable not in all patterns
25    |
26 help: if you meant to match on unit variant `E::A`, use the full path in the pattern
27    |
28 LL |         (E::A, B) | (ref B, c) | (c, A) => ()
29    |          ~~~~
30
31 error[E0408]: variable `B` is not bound in all patterns
32   --> $DIR/resolve-inconsistent-names.rs:19:31
33    |
34 LL |         (A, B) | (ref B, c) | (c, A) => ()
35    |             -         -       ^^^^^^ pattern doesn't bind `B`
36    |             |         |
37    |             |         variable not in all patterns
38    |             variable not in all patterns
39
40 error[E0408]: variable `c` is not bound in all patterns
41   --> $DIR/resolve-inconsistent-names.rs:19:9
42    |
43 LL |         (A, B) | (ref B, c) | (c, A) => ()
44    |         ^^^^^^           -     - variable not in all patterns
45    |         |                |
46    |         |                variable not in all patterns
47    |         pattern doesn't bind `c`
48
49 error[E0409]: variable `B` is bound inconsistently across alternatives separated by `|`
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
58   --> $DIR/resolve-inconsistent-names.rs:31:23
59    |
60 LL |         (CONST1, _) | (_, Const2) => ()
61    |          ------       ^^^^^^^^^^^ pattern doesn't bind `CONST1`
62    |          |
63    |          variable not in all patterns
64    |
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
67    |
68 LL |     const CONST1: usize = 10;
69    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible
70
71 error[E0408]: variable `Const2` is not bound in all patterns
72   --> $DIR/resolve-inconsistent-names.rs:31:9
73    |
74 LL |         (CONST1, _) | (_, Const2) => ()
75    |         ^^^^^^^^^^^       ------ variable not in all patterns
76    |         |
77    |         pattern doesn't bind `Const2`
78    |
79 help: if you meant to match on constant `m::Const2`, use the full path in the pattern
80    |
81 LL |         (CONST1, _) | (_, m::Const2) => ()
82    |                           ~~~~~~~~~
83
84 error[E0308]: mismatched types
85   --> $DIR/resolve-inconsistent-names.rs:19:19
86    |
87 LL |     match x {
88    |           - this expression has type `(E, E)`
89 LL |         (A, B) | (ref B, c) | (c, A) => ()
90    |             -     ^^^^^ expected enum `E`, found `&E`
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
95 help: consider removing `ref`
96    |
97 LL -         (A, B) | (ref B, c) | (c, A) => ()
98 LL +         (A, B) | (B, c) | (c, A) => ()
99    |
100
101 error: aborting due to 9 previous errors
102
103 Some errors have detailed explanations: E0308, E0408, E0409.
104 For more information about an error, try `rustc --explain E0308`.