@@ -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
@@ -101,15 +106,17 @@ LL | | }
101106help: you might have meant to use one of the following enum variants
102107 |
103108LL | let _: Bar = Bar::E.Bad(0);
104- | ~~~~~~
109+ | +++
105110LL | let _: Bar = Bar::F.Bad(0);
106- | ~~~~~~
111+ | +++
107112help: alternatively, the following enum variants are also available
108113 |
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+ |
113120
114121error[E0423]: expected value, found enum `Bar`
115122 --> $DIR/enum-expected-value-suggest-variants.rs:45:18
@@ -130,15 +137,17 @@ LL | | }
130137help: you might have meant to use one of the following enum variants
131138 |
132139LL | let _: Bar = Bar::E.Bad;
133- | ~~~~~~
140+ | +++
134141LL | let _: Bar = Bar::F.Bad;
135- | ~~~~~~
142+ | +++
136143help: alternatively, the following enum variants are also available
137144 |
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+ |
142151
143152error[E0531]: cannot find tuple struct or tuple variant `A` in this scope
144153 --> $DIR/enum-expected-value-suggest-variants.rs:51:9
@@ -169,9 +178,9 @@ LL | | }
169178help: try to match against one of the enum's variants
170179 |
171180LL | Foo::A(..) => {}
172- | ~~~~~~
181+ | +++
173182LL | Foo::B(..) => {}
174- | ~~~~~~
183+ | +++
175184
176185error[E0423]: expected function, tuple struct or tuple variant, found enum `Foo`
177186 --> $DIR/enum-expected-value-suggest-variants.rs:15:18
@@ -191,9 +200,9 @@ LL | | }
191200help: try to construct one of the enum's variants
192201 |
193202LL | let _: Foo = Foo::A(0);
194- | ~~~~~~
203+ | +++
195204LL | let _: Foo = Foo::B(0);
196- | ~~~~~~
205+ | +++
197206
198207error[E0423]: expected function, tuple struct or tuple variant, found enum `Bar`
199208 --> $DIR/enum-expected-value-suggest-variants.rs:27:18
@@ -215,9 +224,9 @@ LL | | }
215224help: try to construct one of the enum's variants
216225 |
217226LL | let _: Bar = Bar::C(0);
218- | ~~~~~~
227+ | +++
219228LL | let _: Bar = Bar::D(0);
220- | ~~~~~~
229+ | +++
221230
222231error: aborting due to 10 previous errors
223232
0 commit comments