|
1 |
| -error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Variant` |
2 |
| - --> $DIR/type-alias-enum-variants-panic.rs:9:5 |
| 1 | +error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Braced` |
| 2 | + --> $DIR/type-alias-enum-variants-panic.rs:12:5 |
3 | 3 | |
|
4 |
| -LL | Alias::Variant; |
5 |
| - | ^^^^^^^^^^^^^^ |
| 4 | +LL | Alias::Braced; |
| 5 | + | ^^^^^^^^^^^^^ |
6 | 6 |
|
7 |
| -error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Variant` |
8 |
| - --> $DIR/type-alias-enum-variants-panic.rs:11:9 |
| 7 | +error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Braced` |
| 8 | + --> $DIR/type-alias-enum-variants-panic.rs:14:9 |
9 | 9 | |
|
10 |
| -LL | let Alias::Variant = panic!(); |
11 |
| - | ^^^^^^^^^^^^^^ |
| 10 | +LL | let Alias::Braced = panic!(); |
| 11 | + | ^^^^^^^^^^^^^ |
12 | 12 |
|
13 |
| -error[E0164]: expected tuple struct/variant, found struct variant `<Alias>::Variant` |
14 |
| - --> $DIR/type-alias-enum-variants-panic.rs:13:9 |
| 13 | +error[E0164]: expected tuple struct/variant, found struct variant `<Alias>::Braced` |
| 14 | + --> $DIR/type-alias-enum-variants-panic.rs:16:9 |
15 | 15 | |
|
16 |
| -LL | let Alias::Variant(..) = panic!(); |
17 |
| - | ^^^^^^^^^^^^^^^^^^ not a tuple variant or struct |
| 16 | +LL | let Alias::Braced(..) = panic!(); |
| 17 | + | ^^^^^^^^^^^^^^^^^ not a tuple variant or struct |
18 | 18 |
|
19 |
| -error: aborting due to 3 previous errors |
| 19 | +error[E0618]: expected function, found enum variant `<Alias>::Unit` |
| 20 | + --> $DIR/type-alias-enum-variants-panic.rs:19:5 |
| 21 | + | |
| 22 | +LL | enum Enum { Braced {}, Unit, Tuple() } |
| 23 | + | ---- `<Alias>::Unit` defined here |
| 24 | +... |
| 25 | +LL | Alias::Unit(); |
| 26 | + | ^^^^^^^^^^^-- |
| 27 | + | | |
| 28 | + | call expression requires function |
| 29 | +help: `<Alias>::Unit` is a unit variant, you need to write it without the parenthesis |
| 30 | + | |
| 31 | +LL | <Alias>::Unit; |
| 32 | + | ^^^^^^^^^^^^^ |
| 33 | + |
| 34 | +error[E0164]: expected tuple struct/variant, found unit variant `<Alias>::Unit` |
| 35 | + --> $DIR/type-alias-enum-variants-panic.rs:21:9 |
| 36 | + | |
| 37 | +LL | let Alias::Unit() = panic!(); |
| 38 | + | ^^^^^^^^^^^^^ not a tuple variant or struct |
| 39 | + |
| 40 | +error: aborting due to 5 previous errors |
20 | 41 |
|
21 |
| -For more information about this error, try `rustc --explain E0164`. |
| 42 | +Some errors have detailed explanations: E0164, E0618. |
| 43 | +For more information about an error, try `rustc --explain E0164`. |
0 commit comments