1 error[E0423]: expected value, found enum `A`
2 --> $DIR/issue-73427.rs:29:5
7 note: the enum is defined here
8 --> $DIR/issue-73427.rs:1:1
11 LL | | StructWithFields { x: () },
12 LL | | TupleWithFields(()),
18 help: you might have meant to use one of the following enum variants
20 LL | (A::Struct {}).foo();
22 LL | (A::Tuple()).foo();
26 help: the following enum variants are available
28 LL | (A::StructWithFields { /* fields */ }).foo();
29 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 LL | (A::TupleWithFields(/* fields */)).foo();
31 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 error[E0423]: expected value, found enum `B`
34 --> $DIR/issue-73427.rs:31:5
39 note: the enum is defined here
40 --> $DIR/issue-73427.rs:9:1
43 LL | | StructWithFields { x: () },
44 LL | | TupleWithFields(()),
47 help: the following enum variants are available
49 LL | (B::StructWithFields { /* fields */ }).foo();
50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51 LL | (B::TupleWithFields(/* fields */)).foo();
52 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54 error[E0423]: expected value, found enum `C`
55 --> $DIR/issue-73427.rs:33:5
60 note: the enum is defined here
61 --> $DIR/issue-73427.rs:14:1
64 LL | | StructWithFields { x: () },
65 LL | | TupleWithFields(()),
69 help: you might have meant to use the following enum variant
73 help: the following enum variants are available
75 LL | (C::StructWithFields { /* fields */ }).foo();
76 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 LL | (C::TupleWithFields(/* fields */)).foo();
78 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80 error[E0423]: expected value, found enum `D`
81 --> $DIR/issue-73427.rs:35:5
86 note: the enum is defined here
87 --> $DIR/issue-73427.rs:20:1
90 LL | | TupleWithFields(()),
94 help: you might have meant to use the following enum variant
98 help: the following enum variant is available
100 LL | (D::TupleWithFields(/* fields */)).foo();
101 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
104 --> $DIR/issue-73427.rs:40:13
109 = help: you might have meant to construct one of the enum's non-tuple variants
110 note: the enum is defined here
111 --> $DIR/issue-73427.rs:1:1
114 LL | | StructWithFields { x: () },
115 LL | | TupleWithFields(()),
121 help: try to construct one of the enum's variants
123 LL | let x = A::Tuple(3);
125 LL | let x = A::TupleWithFields(3);
128 error[E0532]: expected tuple struct or tuple variant, found enum `A`
129 --> $DIR/issue-73427.rs:42:12
131 LL | if let A(3) = x { }
134 = help: you might have meant to match against one of the enum's non-tuple variants
135 note: the enum is defined here
136 --> $DIR/issue-73427.rs:1:1
139 LL | | StructWithFields { x: () },
140 LL | | TupleWithFields(()),
146 help: try to match against one of the enum's variants
148 LL | if let A::Tuple(3) = x { }
150 LL | if let A::TupleWithFields(3) = x { }
153 error: aborting due to 6 previous errors
155 Some errors have detailed explanations: E0423, E0532.
156 For more information about an error, try `rustc --explain E0423`.