]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-tuple-pat.stderr
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / empty / empty-struct-tuple-pat.stderr
1 error[E0530]: match bindings cannot shadow tuple structs
2   --> $DIR/empty-struct-tuple-pat.rs:22:9
3    |
4 LL | struct Empty2();
5    | ---------------- the tuple struct `Empty2` is defined here
6 ...
7 LL |         Empty2 => ()
8    |         ^^^^^^
9    |         |
10    |         cannot be named the same as a tuple struct
11    |         help: try specify the pattern arguments: `Empty2(..)`
12
13 error[E0530]: match bindings cannot shadow tuple structs
14   --> $DIR/empty-struct-tuple-pat.rs:25:9
15    |
16 LL | use empty_struct::*;
17    |     --------------- the tuple struct `XEmpty6` is imported here
18 ...
19 LL |         XEmpty6 => ()
20    |         ^^^^^^^
21    |         |
22    |         cannot be named the same as a tuple struct
23    |         help: try specify the pattern arguments: `XEmpty6(..)`
24
25 error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
26   --> $DIR/empty-struct-tuple-pat.rs:29:9
27    |
28 LL |     Empty4()
29    |     -------- `E::Empty4` defined here
30 ...
31 LL |         E::Empty4 => ()
32    |         ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()`
33
34 error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
35   --> $DIR/empty-struct-tuple-pat.rs:33:9
36    |
37 LL |         XE::XEmpty5 => (),
38    |         ^^^^^^^^^^^
39    |
40   ::: $DIR/auxiliary/empty-struct.rs:7:5
41    |
42 LL |     XEmpty4,
43    |     ------- similarly named unit variant `XEmpty4` defined here
44 LL |     XEmpty5(),
45    |     ------- `XE::XEmpty5` defined here
46    |
47 help: use the tuple variant pattern syntax instead
48    |
49 LL |         XE::XEmpty5(/* fields */) => (),
50    |         ~~~~~~~~~~~~~~~~~~~~~~~~~
51 help: a unit variant with a similar name exists
52    |
53 LL |         XE::XEmpty4 => (),
54    |             ~~~~~~~
55
56 error: aborting due to 4 previous errors
57
58 Some errors have detailed explanations: E0530, E0532.
59 For more information about an error, try `rustc --explain E0530`.