]> git.proxmox.com Git - rustc.git/blame - tests/ui/resolve/resolve-inconsistent-names.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / ui / resolve / resolve-inconsistent-names.stderr
CommitLineData
ff7c6d11 1error[E0408]: variable `a` is not bound in all patterns
416331ca 2 --> $DIR/resolve-inconsistent-names.rs:13:12
ff7c6d11 3 |
532ac7d7 4LL | a | b => {}
ff7c6d11
XL
5 | - ^ pattern doesn't bind `a`
6 | |
7 | variable not in all patterns
8
9error[E0408]: variable `b` is not bound in all patterns
416331ca 10 --> $DIR/resolve-inconsistent-names.rs:13:8
ff7c6d11 11 |
532ac7d7 12LL | a | b => {}
ff7c6d11
XL
13 | ^ - variable not in all patterns
14 | |
15 | pattern doesn't bind `b`
16
add651ee
FG
17error[E0408]: variable `c` is not bound in all patterns
18 --> $DIR/resolve-inconsistent-names.rs:19:9
19 |
20LL | (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
26error[E0408]: variable `A` is not bound in all patterns
27 --> $DIR/resolve-inconsistent-names.rs:19:18
28 |
29LL | (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 35help: if you meant to match on unit variant `E::A`, use the full path in the pattern
416331ca 36 |
04454e1e
FG
37LL | (E::A, B) | (ref B, c) | (c, A) => ()
38 | ~~~~
416331ca
XL
39
40error[E0408]: variable `B` is not bound in all patterns
41 --> $DIR/resolve-inconsistent-names.rs:19:31
42 |
43LL | (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 49error[E0409]: variable `B` is bound inconsistently across alternatives separated by `|`
416331ca
XL
50 --> $DIR/resolve-inconsistent-names.rs:19:23
51 |
52LL | (A, B) | (ref B, c) | (c, A) => ()
53 | - ^ bound in different ways
54 | |
55 | first binding
56
57error[E0408]: variable `CONST1` is not bound in all patterns
f2b60f7d 58 --> $DIR/resolve-inconsistent-names.rs:31:23
416331ca
XL
59 |
60LL | (CONST1, _) | (_, Const2) => ()
61 | ------ ^^^^^^^^^^^ pattern doesn't bind `CONST1`
62 | |
63 | variable not in all patterns
64 |
04454e1e
FG
65note: 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
68LL | const CONST1: usize = 10;
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible
416331ca
XL
70
71error[E0408]: variable `Const2` is not bound in all patterns
f2b60f7d 72 --> $DIR/resolve-inconsistent-names.rs:31:9
416331ca
XL
73 |
74LL | (CONST1, _) | (_, Const2) => ()
75 | ^^^^^^^^^^^ ------ variable not in all patterns
76 | |
77 | pattern doesn't bind `Const2`
78 |
04454e1e 79help: if you meant to match on constant `m::Const2`, use the full path in the pattern
416331ca 80 |
04454e1e
FG
81LL | (CONST1, _) | (_, m::Const2) => ()
82 | ~~~~~~~~~
416331ca
XL
83
84error[E0308]: mismatched types
85 --> $DIR/resolve-inconsistent-names.rs:19:19
86 |
dfeec247
XL
87LL | match x {
88 | - this expression has type `(E, E)`
416331ca 89LL | (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
95help: consider removing `ref`
96 |
97LL - (A, B) | (ref B, c) | (c, A) => ()
98LL + (A, B) | (B, c) | (c, A) => ()
99 |
416331ca
XL
100
101error: aborting due to 9 previous errors
ff7c6d11 102
416331ca
XL
103Some errors have detailed explanations: E0308, E0408, E0409.
104For more information about an error, try `rustc --explain E0308`.