2019-10-14 19:20:50 -05:00
|
|
|
error[E0532]: expected unit struct, unit variant or constant, found tuple variant `Foo::Bar`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-32004.rs:10:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-09-22 13:27:55 -05:00
|
|
|
LL | Bar(i32),
|
|
|
|
| -------- `Foo::Bar` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
LL | Baz
|
|
|
|
| --- similarly named unit variant `Baz` defined here
|
2019-09-22 13:27:55 -05:00
|
|
|
...
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | Foo::Bar => {}
|
2020-08-09 19:52:29 -05:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use the tuple variant pattern syntax instead
|
|
|
|
|
|
|
|
|
LL | Foo::Bar(_) => {}
|
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 | Foo::Baz => {}
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~
|
2018-07-15 16:11:54 -05:00
|
|
|
|
2019-10-14 19:20:50 -05:00
|
|
|
error[E0532]: expected tuple struct or tuple variant, found unit struct `S`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-32004.rs:16:9
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2021-05-02 04:46:29 -05:00
|
|
|
LL | struct S;
|
|
|
|
| --------- `S` defined here
|
|
|
|
...
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | S(()) => {}
|
2021-05-02 04:46:29 -05:00
|
|
|
| ^^^^^ help: use this syntax instead: `S`
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0532`.
|