Skip to content

Commit 2c37250

Browse files
committed
Update . -> :: tests for new diff suggestion format.
1 parent ae7b45a commit 2c37250

File tree

2 files changed

+64
-46
lines changed

2 files changed

+64
-46
lines changed

tests/ui/resolve/dot-notation-type-namespace-suggest-path-sep.stderr

+27-18
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ LL | let _ = Alias.new();
4242
|
4343
help: use the path separator to refer to an item
4444
|
45-
LL | let _ = Alias::new();
46-
| ~~
45+
LL - let _ = Alias.new();
46+
LL + let _ = Alias::new();
47+
|
4748

4849
error[E0423]: expected value, found type alias `Alias`
4950
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:26:13
@@ -53,8 +54,9 @@ LL | let _ = Alias.default;
5354
|
5455
help: use the path separator to refer to an item
5556
|
56-
LL | let _ = Alias::default;
57-
| ~~
57+
LL - let _ = Alias.default;
58+
LL + let _ = Alias::default;
59+
|
5860

5961
error[E0423]: expected value, found module `foo`
6062
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:30:13
@@ -64,8 +66,9 @@ LL | let _ = foo.bar;
6466
|
6567
help: use the path separator to refer to an item
6668
|
67-
LL | let _ = foo::bar;
68-
| ~~
69+
LL - let _ = foo.bar;
70+
LL + let _ = foo::bar;
71+
|
6972

7073
error[E0423]: expected value, found struct `std::cell::Cell`
7174
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:37:9
@@ -111,8 +114,9 @@ LL | Type!(alias).get();
111114
= note: this error originates in the macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)
112115
help: use the path separator to refer to an item
113116
|
114-
LL | <Type!(alias)>::get();
115-
| ~~~~~~~~~~~~~~~~
117+
LL - Type!(alias).get();
118+
LL + <Type!(alias)>::get();
119+
|
116120

117121
error[E0423]: expected value, found type alias `Alias`
118122
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:43:9
@@ -126,8 +130,9 @@ LL | Type! {alias}.get;
126130
= note: this error originates in the macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)
127131
help: use the path separator to refer to an item
128132
|
129-
LL | <Type! {alias}>::get;
130-
| ~~~~~~~~~~~~~~~~~
133+
LL - Type! {alias}.get;
134+
LL + <Type! {alias}>::get;
135+
|
131136

132137
error[E0423]: expected value, found struct `Vec`
133138
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:52:9
@@ -189,8 +194,9 @@ LL | let _ = create!(macro method alias);
189194
= note: this error originates in the macro `Type` which comes from the expansion of the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
190195
help: use the path separator to refer to an item
191196
|
192-
LL | <Type!(alias)>::new(0)
193-
| ~~~~~~~~~~~~~~~~
197+
LL - Type!(alias).new(0)
198+
LL + <Type!(alias)>::new(0)
199+
|
194200

195201
error[E0423]: expected value, found type alias `Alias`
196202
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:73:9
@@ -204,8 +210,9 @@ LL | let _ = check_ty!(Alias);
204210
= note: this error originates in the macro `check_ty` (in Nightly builds, run with -Z macro-backtrace for more info)
205211
help: use the path separator to refer to an item
206212
|
207-
LL | $Ty::foo
208-
| ~~
213+
LL - $Ty.foo
214+
LL + $Ty::foo
215+
|
209216

210217
error[E0423]: expected value, found type alias `Alias`
211218
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:80:9
@@ -219,8 +226,9 @@ LL | let _ = check_ident!(foo);
219226
= note: this error originates in the macro `check_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
220227
help: use the path separator to refer to an item
221228
|
222-
LL | <Alias>::$Ident
223-
| ~~~~~~~~~
229+
LL - Alias.$Ident
230+
LL + <Alias>::$Ident
231+
|
224232

225233
error[E0423]: expected value, found type alias `Alias`
226234
--> $DIR/dot-notation-type-namespace-suggest-path-sep.rs:87:9
@@ -234,8 +242,9 @@ LL | let _ = check_ty_ident!(Alias, foo);
234242
= note: this error originates in the macro `check_ty_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
235243
help: use the path separator to refer to an item
236244
|
237-
LL | <$Ty>::$Ident
238-
| ~~~~~~~
245+
LL - $Ty.$Ident
246+
LL + <$Ty>::$Ident
247+
|
239248

240249
error: aborting due to 17 previous errors
241250

tests/ui/resolve/enum-expected-value-suggest-variants.stderr

+37-28
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ LL | | }
1515
| |_^
1616
help: 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

2122
error[E0423]: expected value, found enum `Foo`
2223
--> $DIR/enum-expected-value-suggest-variants.rs:23:18
@@ -35,10 +36,12 @@ LL | | }
3536
| |_^
3637
help: 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

4346
error[E0423]: expected value, found enum `Bar`
4447
--> $DIR/enum-expected-value-suggest-variants.rs:32:18
@@ -58,8 +61,9 @@ LL | | }
5861
| |_^
5962
help: 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

6468
error[E0423]: expected value, found enum `Bar`
6569
--> $DIR/enum-expected-value-suggest-variants.rs:36:18
@@ -79,8 +83,9 @@ LL | | }
7983
| |_^
8084
help: 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

8590
error[E0423]: expected value, found enum `Bar`
8691
--> $DIR/enum-expected-value-suggest-variants.rs:40:18
@@ -101,15 +106,17 @@ LL | | }
101106
help: you might have meant to use one of the following enum variants
102107
|
103108
LL | let _: Bar = Bar::E.Bad(0);
104-
| ~~~~~~
109+
| +++
105110
LL | let _: Bar = Bar::F.Bad(0);
106-
| ~~~~~~
111+
| +++
107112
help: 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

114121
error[E0423]: expected value, found enum `Bar`
115122
--> $DIR/enum-expected-value-suggest-variants.rs:45:18
@@ -130,15 +137,17 @@ LL | | }
130137
help: you might have meant to use one of the following enum variants
131138
|
132139
LL | let _: Bar = Bar::E.Bad;
133-
| ~~~~~~
140+
| +++
134141
LL | let _: Bar = Bar::F.Bad;
135-
| ~~~~~~
142+
| +++
136143
help: 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

143152
error[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 | | }
169178
help: try to match against one of the enum's variants
170179
|
171180
LL | Foo::A(..) => {}
172-
| ~~~~~~
181+
| +++
173182
LL | Foo::B(..) => {}
174-
| ~~~~~~
183+
| +++
175184

176185
error[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 | | }
191200
help: try to construct one of the enum's variants
192201
|
193202
LL | let _: Foo = Foo::A(0);
194-
| ~~~~~~
203+
| +++
195204
LL | let _: Foo = Foo::B(0);
196-
| ~~~~~~
205+
| +++
197206

198207
error[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 | | }
215224
help: try to construct one of the enum's variants
216225
|
217226
LL | let _: Bar = Bar::C(0);
218-
| ~~~~~~
227+
| +++
219228
LL | let _: Bar = Bar::D(0);
220-
| ~~~~~~
229+
| +++
221230

222231
error: aborting due to 10 previous errors
223232

0 commit comments

Comments
 (0)