2018-08-08 07:28:26 -05:00
|
|
|
error[E0530]: match bindings cannot shadow tuple structs
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/empty-struct-tuple-pat.rs:22:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Empty2();
|
2018-11-11 10:46:04 -06:00
|
|
|
| ---------------- the tuple struct `Empty2` is defined here
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | Empty2 => ()
|
2022-07-08 06:54:11 -05:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot be named the same as a tuple struct
|
|
|
|
| help: try specify the pattern arguments: `Empty2(..)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0530]: match bindings cannot shadow tuple structs
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/empty-struct-tuple-pat.rs:25:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | use empty_struct::*;
|
2018-11-11 10:46:04 -06:00
|
|
|
| --------------- the tuple struct `XEmpty6` is imported here
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | XEmpty6 => ()
|
2022-07-08 06:54:11 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
| |
|
|
|
|
| cannot be named the same as a tuple struct
|
|
|
|
| help: try specify the pattern arguments: `XEmpty6(..)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-10-14 19:20:50 -05:00
|
|
|
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/empty-struct-tuple-pat.rs:29:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-09-22 13:27:55 -05:00
|
|
|
LL | Empty4()
|
|
|
|
| -------- `E::Empty4` defined here
|
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | E::Empty4 => ()
|
2020-08-09 19:52:29 -05:00
|
|
|
| ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-10-14 19:20:50 -05:00
|
|
|
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/empty-struct-tuple-pat.rs:33:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | XE::XEmpty5 => (),
|
2020-08-09 19:52:29 -05:00
|
|
|
| ^^^^^^^^^^^
|
2021-06-10 06:52:00 -05:00
|
|
|
|
|
2019-10-14 19:20:50 -05:00
|
|
|
::: $DIR/auxiliary/empty-struct.rs:7:5
|
|
|
|
|
|
|
|
|
LL | XEmpty4,
|
|
|
|
| ------- similarly named unit variant `XEmpty4` defined here
|
2020-08-09 23:14:59 -05:00
|
|
|
LL | XEmpty5(),
|
2022-07-04 04:13:16 -05:00
|
|
|
| ------- `XE::XEmpty5` defined here
|
2020-08-09 19:52:29 -05:00
|
|
|
|
|
|
|
|
help: use the tuple variant pattern syntax instead
|
|
|
|
|
|
|
|
|
LL | XE::XEmpty5(/* fields */) => (),
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~
|
2020-08-09 19:52:29 -05:00
|
|
|
help: a unit variant with a similar name exists
|
|
|
|
|
|
|
|
|
LL | XE::XEmpty4 => (),
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0530, E0532.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0530`.
|