@@ -15,8 +15,9 @@ LL | | }
15
15
| |_^
16
16
help: use the path separator to refer to a variant
17
17
|
18
- LL | let _: Foo = Foo::A(0);
19
- | ~~
18
+ LL - let _: Foo = Foo.A(0);
19
+ LL + let _: Foo = Foo::A(0);
20
+ |
20
21
21
22
error[E0423]: expected value, found enum `Foo`
22
23
--> $DIR/enum-expected-value-suggest-variants.rs:23:18
@@ -35,10 +36,12 @@ LL | | }
35
36
| |_^
36
37
help: the following enum variants are available
37
38
|
38
- LL | let _: Foo = (Foo::A(/* fields */)).Bad(0);
39
- | ~~~~~~~~~~~~~~~~~~~~~~
40
- LL | let _: Foo = (Foo::B(/* fields */)).Bad(0);
41
- | ~~~~~~~~~~~~~~~~~~~~~~
39
+ LL - let _: Foo = Foo.Bad(0);
40
+ LL + let _: Foo = (Foo::A(/* fields */)).Bad(0);
41
+ |
42
+ LL - let _: Foo = Foo.Bad(0);
43
+ LL + let _: Foo = (Foo::B(/* fields */)).Bad(0);
44
+ |
42
45
43
46
error[E0423]: expected value, found enum `Bar`
44
47
--> $DIR/enum-expected-value-suggest-variants.rs:32:18
@@ -58,8 +61,9 @@ LL | | }
58
61
| |_^
59
62
help: use the path separator to refer to a variant
60
63
|
61
- LL | let _: Bar = Bar::C(0);
62
- | ~~
64
+ LL - let _: Bar = Bar.C(0);
65
+ LL + let _: Bar = Bar::C(0);
66
+ |
63
67
64
68
error[E0423]: expected value, found enum `Bar`
65
69
--> $DIR/enum-expected-value-suggest-variants.rs:36:18
@@ -79,8 +83,9 @@ LL | | }
79
83
| |_^
80
84
help: use the path separator to refer to a variant
81
85
|
82
- LL | let _: Bar = Bar::E;
83
- | ~~
86
+ LL - let _: Bar = Bar.E;
87
+ LL + let _: Bar = Bar::E;
88
+ |
84
89
85
90
error[E0423]: expected value, found enum `Bar`
86
91
--> $DIR/enum-expected-value-suggest-variants.rs:40:18
@@ -100,16 +105,20 @@ LL | | }
100
105
| |_^
101
106
help: you might have meant to use one of the following enum variants
102
107
|
103
- LL | let _: Bar = Bar::E.Bad(0);
104
- | ~~~~~~
105
- LL | let _: Bar = Bar::F.Bad(0);
106
- | ~~~~~~
108
+ LL - let _: Bar = Bar.Bad(0);
109
+ LL + let _: Bar = Bar::E.Bad(0);
110
+ |
111
+ LL - let _: Bar = Bar.Bad(0);
112
+ LL + let _: Bar = Bar::F.Bad(0);
113
+ |
107
114
help: alternatively, the following enum variants are also available
108
115
|
109
- LL | let _: Bar = (Bar::C(/* fields */)).Bad(0);
110
- | ~~~~~~~~~~~~~~~~~~~~~~
111
- LL | let _: Bar = (Bar::D(/* fields */)).Bad(0);
112
- | ~~~~~~~~~~~~~~~~~~~~~~
116
+ LL - let _: Bar = Bar.Bad(0);
117
+ LL + let _: Bar = (Bar::C(/* fields */)).Bad(0);
118
+ |
119
+ LL - let _: Bar = Bar.Bad(0);
120
+ LL + let _: Bar = (Bar::D(/* fields */)).Bad(0);
121
+ |
113
122
114
123
error[E0423]: expected value, found enum `Bar`
115
124
--> $DIR/enum-expected-value-suggest-variants.rs:45:18
@@ -129,16 +138,20 @@ LL | | }
129
138
| |_^
130
139
help: you might have meant to use one of the following enum variants
131
140
|
132
- LL | let _: Bar = Bar::E.Bad;
133
- | ~~~~~~
134
- LL | let _: Bar = Bar::F.Bad;
135
- | ~~~~~~
141
+ LL - let _: Bar = Bar.Bad;
142
+ LL + let _: Bar = Bar::E.Bad;
143
+ |
144
+ LL - let _: Bar = Bar.Bad;
145
+ LL + let _: Bar = Bar::F.Bad;
146
+ |
136
147
help: alternatively, the following enum variants are also available
137
148
|
138
- LL | let _: Bar = (Bar::C(/* fields */)).Bad;
139
- | ~~~~~~~~~~~~~~~~~~~~~~
140
- LL | let _: Bar = (Bar::D(/* fields */)).Bad;
141
- | ~~~~~~~~~~~~~~~~~~~~~~
149
+ LL - let _: Bar = Bar.Bad;
150
+ LL + let _: Bar = (Bar::C(/* fields */)).Bad;
151
+ |
152
+ LL - let _: Bar = Bar.Bad;
153
+ LL + let _: Bar = (Bar::D(/* fields */)).Bad;
154
+ |
142
155
143
156
error[E0531]: cannot find tuple struct or tuple variant `A` in this scope
144
157
--> $DIR/enum-expected-value-suggest-variants.rs:51:9
@@ -168,10 +181,12 @@ LL | | }
168
181
| |_^
169
182
help: try to match against one of the enum's variants
170
183
|
171
- LL | Foo::A(..) => {}
172
- | ~~~~~~
173
- LL | Foo::B(..) => {}
174
- | ~~~~~~
184
+ LL - Foo(..) => {}
185
+ LL + Foo::A(..) => {}
186
+ |
187
+ LL - Foo(..) => {}
188
+ LL + Foo::B(..) => {}
189
+ |
175
190
176
191
error[E0423]: expected function, tuple struct or tuple variant, found enum `Foo`
177
192
--> $DIR/enum-expected-value-suggest-variants.rs:15:18
@@ -190,10 +205,12 @@ LL | | }
190
205
| |_^
191
206
help: try to construct one of the enum's variants
192
207
|
193
- LL | let _: Foo = Foo::A(0);
194
- | ~~~~~~
195
- LL | let _: Foo = Foo::B(0);
196
- | ~~~~~~
208
+ LL - let _: Foo = Foo(0);
209
+ LL + let _: Foo = Foo::A(0);
210
+ |
211
+ LL - let _: Foo = Foo(0);
212
+ LL + let _: Foo = Foo::B(0);
213
+ |
197
214
198
215
error[E0423]: expected function, tuple struct or tuple variant, found enum `Bar`
199
216
--> $DIR/enum-expected-value-suggest-variants.rs:27:18
@@ -214,10 +231,12 @@ LL | | }
214
231
| |_^
215
232
help: try to construct one of the enum's variants
216
233
|
217
- LL | let _: Bar = Bar::C(0);
218
- | ~~~~~~
219
- LL | let _: Bar = Bar::D(0);
220
- | ~~~~~~
234
+ LL - let _: Bar = Bar(0);
235
+ LL + let _: Bar = Bar::C(0);
236
+ |
237
+ LL - let _: Bar = Bar(0);
238
+ LL + let _: Bar = Bar::D(0);
239
+ |
221
240
222
241
error: aborting due to 10 previous errors
223
242
0 commit comments