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