]>
Commit | Line | Data |
---|---|---|
e74abb32 | 1 | error[E0532]: expected unit struct, unit variant or constant, found tuple variant `Foo::Bar` |
0731742a | 2 | --> $DIR/issue-32004.rs:10:9 |
8faf50e0 | 3 | | |
e74abb32 XL |
4 | LL | Bar(i32), |
5 | | -------- `Foo::Bar` defined here | |
6 | LL | Baz | |
7 | | --- similarly named unit variant `Baz` defined here | |
8 | ... | |
8faf50e0 | 9 | LL | Foo::Bar => {} |
3dfed10e XL |
10 | | ^^^^^^^^ |
11 | | | |
12 | help: use the tuple variant pattern syntax instead | |
13 | | | |
14 | LL | Foo::Bar(_) => {} | |
94222f64 | 15 | | ~~~~~~~~~~~ |
3dfed10e XL |
16 | help: a unit variant with a similar name exists |
17 | | | |
18 | LL | Foo::Baz => {} | |
94222f64 | 19 | | ~~~ |
8faf50e0 | 20 | |
e74abb32 | 21 | error[E0532]: expected tuple struct or tuple variant, found unit struct `S` |
0731742a | 22 | --> $DIR/issue-32004.rs:16:9 |
8faf50e0 | 23 | | |
17df50a5 XL |
24 | LL | struct S; |
25 | | --------- `S` defined here | |
26 | ... | |
8faf50e0 | 27 | LL | S(()) => {} |
17df50a5 | 28 | | ^^^^^ help: use this syntax instead: `S` |
8faf50e0 XL |
29 | |
30 | error: aborting due to 2 previous errors | |
31 | ||
32 | For more information about this error, try `rustc --explain E0532`. |