]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/resolve-inconsistent-names.stderr
Update const_forget.rs
[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 a variant or a `const` item, consider making the path in the pattern qualified: `?::A`
27   --> $DIR/resolve-inconsistent-names.rs:19:10
28    |
29 LL |         (A, B) | (ref B, c) | (c, A) => ()
30    |          ^
31
32 error[E0408]: variable `B` is not bound in all patterns
33   --> $DIR/resolve-inconsistent-names.rs:19:31
34    |
35 LL |         (A, B) | (ref B, c) | (c, A) => ()
36    |             -         -       ^^^^^^ pattern doesn't bind `B`
37    |             |         |
38    |             |         variable not in all patterns
39    |             variable not in all patterns
40
41 error[E0408]: variable `c` is not bound in all patterns
42   --> $DIR/resolve-inconsistent-names.rs:19:9
43    |
44 LL |         (A, B) | (ref B, c) | (c, A) => ()
45    |         ^^^^^^           -     - variable not in all patterns
46    |         |                |
47    |         |                variable not in all patterns
48    |         pattern doesn't bind `c`
49
50 error[E0409]: variable `B` is bound in inconsistent ways within the same match arm
51   --> $DIR/resolve-inconsistent-names.rs:19:23
52    |
53 LL |         (A, B) | (ref B, c) | (c, A) => ()
54    |             -         ^ bound in different ways
55    |             |
56    |             first binding
57
58 error[E0408]: variable `CONST1` is not bound in all patterns
59   --> $DIR/resolve-inconsistent-names.rs:30:23
60    |
61 LL |         (CONST1, _) | (_, Const2) => ()
62    |          ------       ^^^^^^^^^^^ pattern doesn't bind `CONST1`
63    |          |
64    |          variable not in all patterns
65    |
66 help: if you meant to match on a variant or a `const` item, consider making the path in the pattern qualified: `?::CONST1`
67   --> $DIR/resolve-inconsistent-names.rs:30:10
68    |
69 LL |         (CONST1, _) | (_, Const2) => ()
70    |          ^^^^^^
71
72 error[E0408]: variable `Const2` is not bound in all patterns
73   --> $DIR/resolve-inconsistent-names.rs:30:9
74    |
75 LL |         (CONST1, _) | (_, Const2) => ()
76    |         ^^^^^^^^^^^       ------ variable not in all patterns
77    |         |
78    |         pattern doesn't bind `Const2`
79    |
80 help: if you meant to match on a variant or a `const` item, consider making the path in the pattern qualified: `?::Const2`
81   --> $DIR/resolve-inconsistent-names.rs:30:27
82    |
83 LL |         (CONST1, _) | (_, Const2) => ()
84    |                           ^^^^^^
85
86 error[E0308]: mismatched types
87   --> $DIR/resolve-inconsistent-names.rs:19:19
88    |
89 LL |     match x {
90    |           - this expression has type `(E, E)`
91 LL |         (A, B) | (ref B, c) | (c, A) => ()
92    |             -     ^^^^^ expected enum `E`, found `&E`
93    |             |
94    |             first introduced with type `E` here
95    |
96    = note: in the same arm, a binding must have the same type in all alternatives
97
98 error: aborting due to 9 previous errors
99
100 Some errors have detailed explanations: E0308, E0408, E0409.
101 For more information about an error, try `rustc --explain E0308`.