@@ -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
@@ -101,15 +106,17 @@ LL | | }
101
106
help: you might have meant to use one of the following enum variants
102
107
|
103
108
LL | let _: Bar = Bar::E.Bad(0);
104
- | ~~~~~~
109
+ | +++
105
110
LL | let _: Bar = Bar::F.Bad(0);
106
- | ~~~~~~
111
+ | +++
107
112
help: alternatively, the following enum variants are also available
108
113
|
109
- LL | let _: Bar = (Bar::C(/* fields */)).Bad(0);
110
- | ~~~~~~~~~~~~~~~~~~~~~~
111
- LL | let _: Bar = (Bar::D(/* fields */)).Bad(0);
112
- | ~~~~~~~~~~~~~~~~~~~~~~
114
+ LL - let _: Bar = Bar.Bad(0);
115
+ LL + let _: Bar = (Bar::C(/* fields */)).Bad(0);
116
+ |
117
+ LL - let _: Bar = Bar.Bad(0);
118
+ LL + let _: Bar = (Bar::D(/* fields */)).Bad(0);
119
+ |
113
120
114
121
error[E0423]: expected value, found enum `Bar`
115
122
--> $DIR/enum-expected-value-suggest-variants.rs:45:18
@@ -130,15 +137,17 @@ LL | | }
130
137
help: you might have meant to use one of the following enum variants
131
138
|
132
139
LL | let _: Bar = Bar::E.Bad;
133
- | ~~~~~~
140
+ | +++
134
141
LL | let _: Bar = Bar::F.Bad;
135
- | ~~~~~~
142
+ | +++
136
143
help: alternatively, the following enum variants are also available
137
144
|
138
- LL | let _: Bar = (Bar::C(/* fields */)).Bad;
139
- | ~~~~~~~~~~~~~~~~~~~~~~
140
- LL | let _: Bar = (Bar::D(/* fields */)).Bad;
141
- | ~~~~~~~~~~~~~~~~~~~~~~
145
+ LL - let _: Bar = Bar.Bad;
146
+ LL + let _: Bar = (Bar::C(/* fields */)).Bad;
147
+ |
148
+ LL - let _: Bar = Bar.Bad;
149
+ LL + let _: Bar = (Bar::D(/* fields */)).Bad;
150
+ |
142
151
143
152
error[E0531]: cannot find tuple struct or tuple variant `A` in this scope
144
153
--> $DIR/enum-expected-value-suggest-variants.rs:51:9
@@ -169,9 +178,9 @@ LL | | }
169
178
help: try to match against one of the enum's variants
170
179
|
171
180
LL | Foo::A(..) => {}
172
- | ~~~~~~
181
+ | +++
173
182
LL | Foo::B(..) => {}
174
- | ~~~~~~
183
+ | +++
175
184
176
185
error[E0423]: expected function, tuple struct or tuple variant, found enum `Foo`
177
186
--> $DIR/enum-expected-value-suggest-variants.rs:15:18
@@ -191,9 +200,9 @@ LL | | }
191
200
help: try to construct one of the enum's variants
192
201
|
193
202
LL | let _: Foo = Foo::A(0);
194
- | ~~~~~~
203
+ | +++
195
204
LL | let _: Foo = Foo::B(0);
196
- | ~~~~~~
205
+ | +++
197
206
198
207
error[E0423]: expected function, tuple struct or tuple variant, found enum `Bar`
199
208
--> $DIR/enum-expected-value-suggest-variants.rs:27:18
@@ -215,9 +224,9 @@ LL | | }
215
224
help: try to construct one of the enum's variants
216
225
|
217
226
LL | let _: Bar = Bar::C(0);
218
- | ~~~~~~
227
+ | +++
219
228
LL | let _: Bar = Bar::D(0);
220
- | ~~~~~~
229
+ | +++
221
230
222
231
error: aborting due to 10 previous errors
223
232
0 commit comments