]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0530]: match bindings cannot shadow tuple structs |
0731742a | 2 | --> $DIR/empty-struct-tuple-pat.rs:22:9 |
b7449926 XL |
3 | | |
4 | LL | struct Empty2(); | |
13cf67c4 | 5 | | ---------------- the tuple struct `Empty2` is defined here |
b7449926 | 6 | ... |
532ac7d7 | 7 | LL | Empty2 => () |
064997fb FG |
8 | | ^^^^^^ |
9 | | | | |
10 | | cannot be named the same as a tuple struct | |
11 | | help: try specify the pattern arguments: `Empty2(..)` | |
b7449926 XL |
12 | |
13 | error[E0530]: match bindings cannot shadow tuple structs | |
0731742a | 14 | --> $DIR/empty-struct-tuple-pat.rs:25:9 |
b7449926 XL |
15 | | |
16 | LL | use empty_struct::*; | |
13cf67c4 | 17 | | --------------- the tuple struct `XEmpty6` is imported here |
b7449926 | 18 | ... |
532ac7d7 | 19 | LL | XEmpty6 => () |
064997fb FG |
20 | | ^^^^^^^ |
21 | | | | |
22 | | cannot be named the same as a tuple struct | |
23 | | help: try specify the pattern arguments: `XEmpty6(..)` | |
b7449926 | 24 | |
e74abb32 | 25 | error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4` |
0731742a | 26 | --> $DIR/empty-struct-tuple-pat.rs:29:9 |
b7449926 | 27 | | |
e74abb32 XL |
28 | LL | Empty4() |
29 | | -------- `E::Empty4` defined here | |
30 | ... | |
b7449926 | 31 | LL | E::Empty4 => () |
3dfed10e | 32 | | ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()` |
b7449926 | 33 | |
e74abb32 | 34 | error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5` |
0731742a | 35 | --> $DIR/empty-struct-tuple-pat.rs:33:9 |
b7449926 XL |
36 | | |
37 | LL | XE::XEmpty5 => (), | |
3dfed10e | 38 | | ^^^^^^^^^^^ |
94222f64 | 39 | | |
dfeec247 XL |
40 | ::: $DIR/auxiliary/empty-struct.rs:7:5 |
41 | | | |
42 | LL | XEmpty4, | |
43 | | ------- similarly named unit variant `XEmpty4` defined here | |
3dfed10e | 44 | LL | XEmpty5(), |
064997fb | 45 | | ------- `XE::XEmpty5` defined here |
3dfed10e XL |
46 | | |
47 | help: use the tuple variant pattern syntax instead | |
48 | | | |
49 | LL | XE::XEmpty5(/* fields */) => (), | |
94222f64 | 50 | | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
3dfed10e XL |
51 | help: a unit variant with a similar name exists |
52 | | | |
53 | LL | XE::XEmpty4 => (), | |
94222f64 | 54 | | ~~~~~~~ |
b7449926 XL |
55 | |
56 | error: aborting due to 4 previous errors | |
57 | ||
48663c56 | 58 | Some errors have detailed explanations: E0530, E0532. |
b7449926 | 59 | For more information about an error, try `rustc --explain E0530`. |