summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/resolve-inconsistent-names.stderr
blob: 773c9f6cd1114800768a1c43b55f97210b5ff78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
error[E0408]: variable `a` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:13:12
   |
LL |        a | b => {}
   |        -   ^ pattern doesn't bind `a`
   |        |
   |        variable not in all patterns

error[E0408]: variable `b` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:13:8
   |
LL |        a | b => {}
   |        ^   - variable not in all patterns
   |        |
   |        pattern doesn't bind `b`

error[E0408]: variable `A` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:19:18
   |
LL |         (A, B) | (ref B, c) | (c, A) => ()
   |          -       ^^^^^^^^^^       - variable not in all patterns
   |          |       |
   |          |       pattern doesn't bind `A`
   |          variable not in all patterns
   |
help: if you meant to match on unit variant `E::A`, use the full path in the pattern
   |
LL |         (E::A, B) | (ref B, c) | (c, A) => ()
   |          ~~~~

error[E0408]: variable `B` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:19:31
   |
LL |         (A, B) | (ref B, c) | (c, A) => ()
   |             -         -       ^^^^^^ pattern doesn't bind `B`
   |             |         |
   |             |         variable not in all patterns
   |             variable not in all patterns

error[E0408]: variable `c` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:19:9
   |
LL |         (A, B) | (ref B, c) | (c, A) => ()
   |         ^^^^^^           -     - variable not in all patterns
   |         |                |
   |         |                variable not in all patterns
   |         pattern doesn't bind `c`

error[E0409]: variable `B` is bound inconsistently across alternatives separated by `|`
  --> $DIR/resolve-inconsistent-names.rs:19:23
   |
LL |         (A, B) | (ref B, c) | (c, A) => ()
   |             -         ^ bound in different ways
   |             |
   |             first binding

error[E0408]: variable `CONST1` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:31:23
   |
LL |         (CONST1, _) | (_, Const2) => ()
   |          ------       ^^^^^^^^^^^ pattern doesn't bind `CONST1`
   |          |
   |          variable not in all patterns
   |
note: you might have meant to match on constant `m::CONST1`, which exists but is inaccessible
  --> $DIR/resolve-inconsistent-names.rs:6:5
   |
LL |     const CONST1: usize = 10;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible

error[E0408]: variable `Const2` is not bound in all patterns
  --> $DIR/resolve-inconsistent-names.rs:31:9
   |
LL |         (CONST1, _) | (_, Const2) => ()
   |         ^^^^^^^^^^^       ------ variable not in all patterns
   |         |
   |         pattern doesn't bind `Const2`
   |
help: if you meant to match on constant `m::Const2`, use the full path in the pattern
   |
LL |         (CONST1, _) | (_, m::Const2) => ()
   |                           ~~~~~~~~~

error[E0308]: mismatched types
  --> $DIR/resolve-inconsistent-names.rs:19:19
   |
LL |     match x {
   |           - this expression has type `(E, E)`
LL |         (A, B) | (ref B, c) | (c, A) => ()
   |             -     ^^^^^ expected enum `E`, found `&E`
   |             |
   |             first introduced with type `E` here
   |
   = note: in the same arm, a binding must have the same type in all alternatives
help: consider removing `ref`
   |
LL -         (A, B) | (ref B, c) | (c, A) => ()
LL +         (A, B) | (B, c) | (c, A) => ()
   |

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0308, E0408, E0409.
For more information about an error, try `rustc --explain E0308`.