1 error[E0423]: expected value, found enum `A`
2 --> $DIR/issue-73427.rs:33: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: alternatively, the following enum variants are also 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:35: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:37: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: alternatively, the following enum variants are also 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:39: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: alternatively, the following enum variant is available
100 LL | (D::TupleWithFields(/* fields */)).foo();
101 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103 error[E0423]: expected value, found enum `E`
104 --> $DIR/issue-73427.rs:41:5
109 note: the enum is defined here
110 --> $DIR/issue-73427.rs:25:1
113 LL | | TupleWithFields(()),
116 help: the following enum variant is available
118 LL | (E::TupleWithFields(/* fields */)).foo();
119 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120 help: consider importing one of these items instead
122 LL | use std::f32::consts::E;
124 LL | use std::f64::consts::E;
127 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
128 --> $DIR/issue-73427.rs:46:13
133 = help: you might have meant to construct one of the enum's non-tuple variants
134 note: the enum is defined here
135 --> $DIR/issue-73427.rs:1:1
138 LL | | StructWithFields { x: () },
139 LL | | TupleWithFields(()),
145 help: try to construct one of the enum's variants
147 LL | let x = A::Tuple(3);
149 LL | let x = A::TupleWithFields(3);
152 error[E0532]: expected tuple struct or tuple variant, found enum `A`
153 --> $DIR/issue-73427.rs:48:12
155 LL | if let A(3) = x { }
158 = help: you might have meant to match against one of the enum's non-tuple variants
159 note: the enum is defined here
160 --> $DIR/issue-73427.rs:1:1
163 LL | | StructWithFields { x: () },
164 LL | | TupleWithFields(()),
170 help: try to match against one of the enum's variants
172 LL | if let A::Tuple(3) = x { }
174 LL | if let A::TupleWithFields(3) = x { }
177 error: aborting due to 7 previous errors
179 Some errors have detailed explanations: E0423, E0532.
180 For more information about an error, try `rustc --explain E0423`.