]> git.proxmox.com Git - rustc.git/blame - src/test/ui/empty/empty-struct-tuple-pat.stderr
New upstream version 1.64.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 => ()
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
13error[E0530]: match bindings cannot shadow tuple structs
0731742a 14 --> $DIR/empty-struct-tuple-pat.rs:25:9
b7449926
XL
15 |
16LL | use empty_struct::*;
13cf67c4 17 | --------------- the tuple struct `XEmpty6` is imported here
b7449926 18...
532ac7d7 19LL | 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 25error[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
28LL | Empty4()
29 | -------- `E::Empty4` defined here
30...
b7449926 31LL | E::Empty4 => ()
3dfed10e 32 | ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()`
b7449926 33
e74abb32 34error[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 |
37LL | XE::XEmpty5 => (),
3dfed10e 38 | ^^^^^^^^^^^
94222f64 39 |
dfeec247
XL
40 ::: $DIR/auxiliary/empty-struct.rs:7:5
41 |
42LL | XEmpty4,
43 | ------- similarly named unit variant `XEmpty4` defined here
3dfed10e 44LL | XEmpty5(),
064997fb 45 | ------- `XE::XEmpty5` defined here
3dfed10e
XL
46 |
47help: use the tuple variant pattern syntax instead
48 |
49LL | XE::XEmpty5(/* fields */) => (),
94222f64 50 | ~~~~~~~~~~~~~~~~~~~~~~~~~
3dfed10e
XL
51help: a unit variant with a similar name exists
52 |
53LL | XE::XEmpty4 => (),
94222f64 54 | ~~~~~~~
b7449926
XL
55
56error: aborting due to 4 previous errors
57
48663c56 58Some errors have detailed explanations: E0530, E0532.
b7449926 59For more information about an error, try `rustc --explain E0530`.