]> git.proxmox.com Git - rustc.git/blame - src/test/ui/empty/empty-struct-tuple-pat.stderr
New upstream version 1.42.0+dfsg1
[rustc.git] / src / test / ui / empty / empty-struct-tuple-pat.stderr
CommitLineData
b7449926 1error[E0530]: match bindings cannot shadow tuple structs
0731742a 2 --> $DIR/empty-struct-tuple-pat.rs:22:9
b7449926
XL
3 |
4LL | struct Empty2();
13cf67c4 5 | ---------------- the tuple struct `Empty2` is defined here
b7449926 6...
532ac7d7 7LL | Empty2 => ()
b7449926
XL
8 | ^^^^^^ cannot be named the same as a tuple struct
9
10error[E0530]: match bindings cannot shadow tuple structs
0731742a 11 --> $DIR/empty-struct-tuple-pat.rs:25:9
b7449926
XL
12 |
13LL | use empty_struct::*;
13cf67c4 14 | --------------- the tuple struct `XEmpty6` is imported here
b7449926 15...
532ac7d7 16LL | XEmpty6 => ()
b7449926
XL
17 | ^^^^^^^ cannot be named the same as a tuple struct
18
e74abb32 19error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
0731742a 20 --> $DIR/empty-struct-tuple-pat.rs:29:9
b7449926 21 |
e74abb32
XL
22LL | Empty4()
23 | -------- `E::Empty4` defined here
24...
b7449926 25LL | E::Empty4 => ()
e74abb32 26 | ^^^^^^^^^ did you mean `E::Empty4( /* fields */ )`?
b7449926 27
e74abb32 28error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
0731742a 29 --> $DIR/empty-struct-tuple-pat.rs:33:9
b7449926
XL
30 |
31LL | XE::XEmpty5 => (),
32 | ^^^^-------
e1599b0c
XL
33 | | |
34 | | help: a unit variant with a similar name exists: `XEmpty4`
e74abb32 35 | did you mean `XE::XEmpty5( /* fields */ )`?
dfeec247
XL
36 |
37 ::: $DIR/auxiliary/empty-struct.rs:7:5
38 |
39LL | XEmpty4,
40 | ------- similarly named unit variant `XEmpty4` defined here
b7449926
XL
41
42error: aborting due to 4 previous errors
43
48663c56 44Some errors have detailed explanations: E0530, E0532.
b7449926 45For more information about an error, try `rustc --explain E0530`.