summaryrefslogtreecommitdiffstats
path: root/tests/ui/empty/empty-struct-tuple-pat.stderr
blob: 45001c7975324e48e087cfd1b3cbb70e362c2992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
error[E0530]: match bindings cannot shadow tuple structs
  --> $DIR/empty-struct-tuple-pat.rs:22:9
   |
LL | struct Empty2();
   | ---------------- the tuple struct `Empty2` is defined here
...
LL |         Empty2 => ()
   |         ^^^^^^
   |         |
   |         cannot be named the same as a tuple struct
   |         help: try specify the pattern arguments: `Empty2(..)`

error[E0530]: match bindings cannot shadow tuple structs
  --> $DIR/empty-struct-tuple-pat.rs:25:9
   |
LL | use empty_struct::*;
   |     --------------- the tuple struct `XEmpty6` is imported here
...
LL |         XEmpty6 => ()
   |         ^^^^^^^
   |         |
   |         cannot be named the same as a tuple struct
   |         help: try specify the pattern arguments: `XEmpty6(..)`

error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
  --> $DIR/empty-struct-tuple-pat.rs:29:9
   |
LL |     Empty4()
   |     -------- `E::Empty4` defined here
...
LL |         E::Empty4 => ()
   |         ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()`

error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
  --> $DIR/empty-struct-tuple-pat.rs:33:9
   |
LL |         XE::XEmpty5 => (),
   |         ^^^^^^^^^^^
   |
  ::: $DIR/auxiliary/empty-struct.rs:7:5
   |
LL |     XEmpty4,
   |     ------- similarly named unit variant `XEmpty4` defined here
LL |     XEmpty5(),
   |     ------- `XE::XEmpty5` defined here
   |
help: use the tuple variant pattern syntax instead
   |
LL |         XE::XEmpty5() => (),
   |         ~~~~~~~~~~~~~
help: a unit variant with a similar name exists
   |
LL |         XE::XEmpty4 => (),
   |             ~~~~~~~

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0530, E0532.
For more information about an error, try `rustc --explain E0530`.