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