@@ -15,8 +15,9 @@ LL | | }
1515 | |_^
1616help: use the path separator to refer to a variant
1717 |
18- LL | let _: Foo = Foo::A(0);
19- | ~~
18+ LL - let _: Foo = Foo.A(0);
19+ LL + let _: Foo = Foo::A(0);
20+ |
2021
2122error[E0423]: expected value, found enum `Foo`
2223 --> $DIR/enum-expected-value-suggest-variants.rs:23:18
@@ -35,10 +36,12 @@ LL | | }
3536 | |_^
3637help: the following enum variants are available
3738 |
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+ |
4245
4346error[E0423]: expected value, found enum `Bar`
4447 --> $DIR/enum-expected-value-suggest-variants.rs:32:18
@@ -58,8 +61,9 @@ LL | | }
5861 | |_^
5962help: use the path separator to refer to a variant
6063 |
61- LL | let _: Bar = Bar::C(0);
62- | ~~
64+ LL - let _: Bar = Bar.C(0);
65+ LL + let _: Bar = Bar::C(0);
66+ |
6367
6468error[E0423]: expected value, found enum `Bar`
6569 --> $DIR/enum-expected-value-suggest-variants.rs:36:18
@@ -79,8 +83,9 @@ LL | | }
7983 | |_^
8084help: use the path separator to refer to a variant
8185 |
82- LL | let _: Bar = Bar::E;
83- | ~~
86+ LL - let _: Bar = Bar.E;
87+ LL + let _: Bar = Bar::E;
88+ |
8489
8590error[E0423]: expected value, found enum `Bar`
8691 --> $DIR/enum-expected-value-suggest-variants.rs:40:18
@@ -100,16 +105,20 @@ LL | | }
100105 | |_^
101106help: you might have meant to use one of the following enum variants
102107 |
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+ |
107114help: alternatively, the following enum variants are also available
108115 |
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+ |
113122
114123error[E0423]: expected value, found enum `Bar`
115124 --> $DIR/enum-expected-value-suggest-variants.rs:45:18
@@ -129,16 +138,20 @@ LL | | }
129138 | |_^
130139help: you might have meant to use one of the following enum variants
131140 |
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+ |
136147help: alternatively, the following enum variants are also available
137148 |
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+ |
142155
143156error[E0531]: cannot find tuple struct or tuple variant `A` in this scope
144157 --> $DIR/enum-expected-value-suggest-variants.rs:51:9
@@ -168,10 +181,12 @@ LL | | }
168181 | |_^
169182help: try to match against one of the enum's variants
170183 |
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+ |
175190
176191error[E0423]: expected function, tuple struct or tuple variant, found enum `Foo`
177192 --> $DIR/enum-expected-value-suggest-variants.rs:15:18
@@ -190,10 +205,12 @@ LL | | }
190205 | |_^
191206help: try to construct one of the enum's variants
192207 |
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+ |
197214
198215error[E0423]: expected function, tuple struct or tuple variant, found enum `Bar`
199216 --> $DIR/enum-expected-value-suggest-variants.rs:27:18
@@ -214,10 +231,12 @@ LL | | }
214231 | |_^
215232help: try to construct one of the enum's variants
216233 |
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+ |
221240
222241error: aborting due to 10 previous errors
223242
0 commit comments