]>
Commit | Line | Data |
---|---|---|
487cf647 | 1 | error[E0533]: expected value, found struct variant `Alias::Braced` |
cdc7bbd5 | 2 | --> $DIR/incorrect-variant-form-through-alias-caught.rs:8:5 |
dc9dc135 XL |
3 | | |
4 | LL | Alias::Braced; | |
487cf647 | 5 | | ^^^^^^^^^^^^^ not a value |
dc9dc135 | 6 | |
e74abb32 | 7 | error[E0533]: expected unit struct, unit variant or constant, found struct variant `Alias::Braced` |
cdc7bbd5 | 8 | --> $DIR/incorrect-variant-form-through-alias-caught.rs:10:9 |
dc9dc135 XL |
9 | | |
10 | LL | let Alias::Braced = panic!(); | |
487cf647 | 11 | | ^^^^^^^^^^^^^ not a unit struct, unit variant or constant |
dc9dc135 | 12 | |
e74abb32 | 13 | error[E0164]: expected tuple struct or tuple variant, found struct variant `Alias::Braced` |
cdc7bbd5 | 14 | --> $DIR/incorrect-variant-form-through-alias-caught.rs:12:9 |
dc9dc135 XL |
15 | | |
16 | LL | let Alias::Braced(..) = panic!(); | |
487cf647 | 17 | | ^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant |
dc9dc135 | 18 | |
e74abb32 | 19 | error[E0618]: expected function, found enum variant `Alias::Unit` |
cdc7bbd5 | 20 | --> $DIR/incorrect-variant-form-through-alias-caught.rs:15:5 |
dc9dc135 XL |
21 | | |
22 | LL | enum Enum { Braced {}, Unit, Tuple() } | |
064997fb | 23 | | ---- enum variant `Alias::Unit` defined here |
dc9dc135 XL |
24 | ... |
25 | LL | Alias::Unit(); | |
26 | | ^^^^^^^^^^^-- | |
27 | | | | |
28 | | call expression requires function | |
dc9dc135 | 29 | | |
064997fb | 30 | help: `Alias::Unit` is a unit enum variant, and does not take parentheses to be constructed |
e74abb32 | 31 | | |
3c0e092e XL |
32 | LL - Alias::Unit(); |
33 | LL + Alias::Unit; | |
923072b8 | 34 | | |
dc9dc135 | 35 | |
e74abb32 | 36 | error[E0164]: expected tuple struct or tuple variant, found unit variant `Alias::Unit` |
cdc7bbd5 | 37 | --> $DIR/incorrect-variant-form-through-alias-caught.rs:17:9 |
dc9dc135 XL |
38 | | |
39 | LL | let Alias::Unit() = panic!(); | |
487cf647 | 40 | | ^^^^^^^^^^^^^ not a tuple struct or tuple variant |
dc9dc135 XL |
41 | |
42 | error: aborting due to 5 previous errors | |
43 | ||
e74abb32 | 44 | Some errors have detailed explanations: E0164, E0533, E0618. |
dc9dc135 | 45 | For more information about an error, try `rustc --explain E0164`. |