]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-tuple-pat.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[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:32:9
3    |
4 LL | struct Empty2();
5    | ---------------- a tuple struct `Empty2` is defined here
6 ...
7 LL |         Empty2 => () //~ ERROR match bindings cannot shadow tuple structs
8    |         ^^^^^^ cannot be named the same as a tuple struct
9
10 error[E0530]: match bindings cannot shadow tuple structs
11   --> $DIR/empty-struct-tuple-pat.rs:35:9
12    |
13 LL | use empty_struct::*;
14    |     --------------- a tuple struct `XEmpty6` is imported here
15 ...
16 LL |         XEmpty6 => () //~ ERROR match bindings cannot shadow tuple structs
17    |         ^^^^^^^ cannot be named the same as a tuple struct
18
19 error[E0532]: expected unit struct/variant or constant, found tuple variant `E::Empty4`
20   --> $DIR/empty-struct-tuple-pat.rs:39:9
21    |
22 LL |         E::Empty4 => ()
23    |         ^^^^^^^^^ not a unit struct/variant or constant
24
25 error[E0532]: expected unit struct/variant or constant, found tuple variant `XE::XEmpty5`
26   --> $DIR/empty-struct-tuple-pat.rs:43:9
27    |
28 LL |         XE::XEmpty5 => (),
29    |         ^^^^-------
30    |             |
31    |             did you mean `XEmpty4`?
32
33 error: aborting due to 4 previous errors
34
35 Some errors occurred: E0530, E0532.
36 For more information about an error, try `rustc --explain E0530`.