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