summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-enum-variants/incorrect-variant-form-through-alias-caught.stderr
blob: 8f3180a8639d876f3a0f18c0b446638031c449e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
error[E0533]: expected unit struct, unit variant or constant, found struct variant `Alias::Braced`
  --> $DIR/incorrect-variant-form-through-alias-caught.rs:8:5
   |
LL |     Alias::Braced;
   |     ^^^^^^^^^^^^^

error[E0533]: expected unit struct, unit variant or constant, found struct variant `Alias::Braced`
  --> $DIR/incorrect-variant-form-through-alias-caught.rs:10:9
   |
LL |     let Alias::Braced = panic!();
   |         ^^^^^^^^^^^^^

error[E0164]: expected tuple struct or tuple variant, found struct variant `Alias::Braced`
  --> $DIR/incorrect-variant-form-through-alias-caught.rs:12:9
   |
LL |     let Alias::Braced(..) = panic!();
   |         ^^^^^^^^^^^^^^^^^ not a tuple variant or struct

error[E0618]: expected function, found enum variant `Alias::Unit`
  --> $DIR/incorrect-variant-form-through-alias-caught.rs:15:5
   |
LL | enum Enum { Braced {}, Unit, Tuple() }
   |                        ---- enum variant `Alias::Unit` defined here
...
LL |     Alias::Unit();
   |     ^^^^^^^^^^^--
   |     |
   |     call expression requires function
   |
help: `Alias::Unit` is a unit enum variant, and does not take parentheses to be constructed
   |
LL -     Alias::Unit();
LL +     Alias::Unit;
   |

error[E0164]: expected tuple struct or tuple variant, found unit variant `Alias::Unit`
  --> $DIR/incorrect-variant-form-through-alias-caught.rs:17:9
   |
LL |     let Alias::Unit() = panic!();
   |         ^^^^^^^^^^^^^ not a tuple variant or struct

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0164, E0533, E0618.
For more information about an error, try `rustc --explain E0164`.