Skip to content

Commit 1adc6be

Browse files
committed
Update .stderr
1 parent fba2f88 commit 1adc6be

File tree

3 files changed

+128
-2
lines changed

3 files changed

+128
-2
lines changed

src/test/ui/did_you_mean/bad-assoc-ty.stderr

+20
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,33 @@ LL | fn foo<X: K<_, _>>(x: X) {}
129129
| ^ ^ not allowed in type signatures
130130
| |
131131
| not allowed in type signatures
132+
|
133+
help: use type parameters instead
134+
|
135+
LL | fn foo<X: K<T, T>, T>(x: X) {}
136+
| ^ ^ ^^^
132137

133138
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
134139
--> $DIR/bad-assoc-ty.rs:52:34
135140
|
136141
LL | fn bar<F>(_: F) where F: Fn() -> _ {}
137142
| ^ not allowed in type signatures
143+
|
144+
help: use type parameters instead
145+
|
146+
LL | fn bar<F, T>(_: F) where F: Fn() -> T {}
147+
| ^^^ ^
138148

139149
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
140150
--> $DIR/bad-assoc-ty.rs:55:19
141151
|
142152
LL | fn baz<F: Fn() -> _>(_: F) {}
143153
| ^ not allowed in type signatures
154+
|
155+
help: use type parameters instead
156+
|
157+
LL | fn baz<F: Fn() -> T, T>(_: F) {}
158+
| ^^^^
144159

145160
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
146161
--> $DIR/bad-assoc-ty.rs:58:33
@@ -202,6 +217,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
202217
|
203218
LL | fn foo<F>(_: F) where F: Fn() -> _ {}
204219
| ^ not allowed in type signatures
220+
|
221+
help: use type parameters instead
222+
|
223+
LL | fn foo<F, T>(_: F) where F: Fn() -> T {}
224+
| ^^^ ^
205225

206226
error: aborting due to 28 previous errors
207227

src/test/ui/self/self-infer.stderr

+10
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
33
|
44
LL | fn f(self: _) {}
55
| ^ not allowed in type signatures
6+
|
7+
help: use type parameters instead
8+
|
9+
LL | fn f<T>(self: T) {}
10+
| ^^^ ^
611

712
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
813
--> $DIR/self-infer.rs:5:17
914
|
1015
LL | fn g(self: &_) {}
1116
| ^ not allowed in type signatures
17+
|
18+
help: use type parameters instead
19+
|
20+
LL | fn g<T>(self: &T) {}
21+
| ^^^ ^
1222

1323
error: aborting due to 2 previous errors
1424

src/test/ui/typeck/typeck_type_placeholder_item.stderr

+98-2
Original file line numberDiff line numberDiff line change
@@ -92,36 +92,64 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
9292
|
9393
LL | fn test6(_: _) { }
9494
| ^ not allowed in type signatures
95+
|
96+
help: use type parameters instead
97+
|
98+
LL | fn test6<T>(_: T) { }
99+
| ^^^ ^
95100

96101
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
97102
--> $DIR/typeck_type_placeholder_item.rs:24:18
98103
|
99104
LL | fn test6_b<T>(_: _, _: T) { }
100105
| ^ not allowed in type signatures
106+
|
107+
help: use type parameters instead
108+
|
109+
LL | fn test6_b<T, U>(_: U, _: T) { }
110+
| ^^^ ^
101111

102112
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
103113
--> $DIR/typeck_type_placeholder_item.rs:27:30
104114
|
105115
LL | fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
106116
| ^ not allowed in type signatures
117+
|
118+
help: use type parameters instead
119+
|
120+
LL | fn test6_c<T, K, L, A, B, U>(_: U, _: (T, K, L, A, B)) { }
121+
| ^^^ ^
107122

108123
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
109124
--> $DIR/typeck_type_placeholder_item.rs:30:13
110125
|
111126
LL | fn test7(x: _) { let _x: usize = x; }
112127
| ^ not allowed in type signatures
128+
|
129+
help: use type parameters instead
130+
|
131+
LL | fn test7<T>(x: T) { let _x: usize = x; }
132+
| ^^^ ^
113133

114134
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
115135
--> $DIR/typeck_type_placeholder_item.rs:33:22
116136
|
117137
LL | fn test8(_f: fn() -> _) { }
118-
| ^ not allowed in type signatures
138+
| ^
139+
| |
140+
| not allowed in type signatures
141+
| help: use type parameters instead: `T`
119142

120143
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
121144
--> $DIR/typeck_type_placeholder_item.rs:33:22
122145
|
123146
LL | fn test8(_f: fn() -> _) { }
124147
| ^ not allowed in type signatures
148+
|
149+
help: use type parameters instead
150+
|
151+
LL | fn test8<T>(_f: fn() -> T) { }
152+
| ^^^ ^
125153

126154
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
127155
--> $DIR/typeck_type_placeholder_item.rs:47:26
@@ -229,24 +257,42 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
229257
|
230258
LL | fn fn_test6(_: _) { }
231259
| ^ not allowed in type signatures
260+
|
261+
help: use type parameters instead
262+
|
263+
LL | fn fn_test6<T>(_: T) { }
264+
| ^^^ ^
232265

233266
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
234267
--> $DIR/typeck_type_placeholder_item.rs:97:20
235268
|
236269
LL | fn fn_test7(x: _) { let _x: usize = x; }
237270
| ^ not allowed in type signatures
271+
|
272+
help: use type parameters instead
273+
|
274+
LL | fn fn_test7<T>(x: T) { let _x: usize = x; }
275+
| ^^^ ^
238276

239277
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
240278
--> $DIR/typeck_type_placeholder_item.rs:100:29
241279
|
242280
LL | fn fn_test8(_f: fn() -> _) { }
243-
| ^ not allowed in type signatures
281+
| ^
282+
| |
283+
| not allowed in type signatures
284+
| help: use type parameters instead: `T`
244285

245286
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
246287
--> $DIR/typeck_type_placeholder_item.rs:100:29
247288
|
248289
LL | fn fn_test8(_f: fn() -> _) { }
249290
| ^ not allowed in type signatures
291+
|
292+
help: use type parameters instead
293+
|
294+
LL | fn fn_test8<T>(_f: fn() -> T) { }
295+
| ^^^ ^
250296

251297
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
252298
--> $DIR/typeck_type_placeholder_item.rs:123:12
@@ -369,6 +415,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
369415
|
370416
LL | fn method_test1(&self, x: _);
371417
| ^ not allowed in type signatures
418+
|
419+
help: use type parameters instead
420+
|
421+
LL | fn method_test1<T>(&self, x: T);
422+
| ^^^ ^
372423

373424
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
374425
--> $DIR/typeck_type_placeholder_item.rs:142:31
@@ -377,18 +428,33 @@ LL | fn method_test2(&self, x: _) -> _;
377428
| ^ ^ not allowed in type signatures
378429
| |
379430
| not allowed in type signatures
431+
|
432+
help: use type parameters instead
433+
|
434+
LL | fn method_test2<T>(&self, x: T) -> T;
435+
| ^^^ ^ ^
380436

381437
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
382438
--> $DIR/typeck_type_placeholder_item.rs:144:31
383439
|
384440
LL | fn method_test3(&self) -> _;
385441
| ^ not allowed in type signatures
442+
|
443+
help: use type parameters instead
444+
|
445+
LL | fn method_test3<T>(&self) -> T;
446+
| ^^^ ^
386447

387448
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
388449
--> $DIR/typeck_type_placeholder_item.rs:146:26
389450
|
390451
LL | fn assoc_fn_test1(x: _);
391452
| ^ not allowed in type signatures
453+
|
454+
help: use type parameters instead
455+
|
456+
LL | fn assoc_fn_test1<T>(x: T);
457+
| ^^^ ^
392458

393459
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
394460
--> $DIR/typeck_type_placeholder_item.rs:148:26
@@ -397,12 +463,22 @@ LL | fn assoc_fn_test2(x: _) -> _;
397463
| ^ ^ not allowed in type signatures
398464
| |
399465
| not allowed in type signatures
466+
|
467+
help: use type parameters instead
468+
|
469+
LL | fn assoc_fn_test2<T>(x: T) -> T;
470+
| ^^^ ^ ^
400471

401472
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
402473
--> $DIR/typeck_type_placeholder_item.rs:150:28
403474
|
404475
LL | fn assoc_fn_test3() -> _;
405476
| ^ not allowed in type signatures
477+
|
478+
help: use type parameters instead
479+
|
480+
LL | fn assoc_fn_test3<T>() -> T;
481+
| ^^^ ^
406482

407483
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
408484
--> $DIR/typeck_type_placeholder_item.rs:190:14
@@ -445,6 +521,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
445521
|
446522
LL | fn test10(&self, _x : _) { }
447523
| ^ not allowed in type signatures
524+
|
525+
help: use type parameters instead
526+
|
527+
LL | fn test10<T>(&self, _x : T) { }
528+
| ^^^ ^
448529

449530
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
450531
--> $DIR/typeck_type_placeholder_item.rs:58:24
@@ -460,6 +541,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
460541
|
461542
LL | fn clone_from(&mut self, other: _) { *self = Test9; }
462543
| ^ not allowed in type signatures
544+
|
545+
help: use type parameters instead
546+
|
547+
LL | fn clone_from<T>(&mut self, other: T) { *self = Test9; }
548+
| ^^^ ^
463549

464550
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
465551
--> $DIR/typeck_type_placeholder_item.rs:107:31
@@ -475,6 +561,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
475561
|
476562
LL | fn fn_test10(&self, _x : _) { }
477563
| ^ not allowed in type signatures
564+
|
565+
help: use type parameters instead
566+
|
567+
LL | fn fn_test10<T>(&self, _x : T) { }
568+
| ^^^ ^
478569

479570
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
480571
--> $DIR/typeck_type_placeholder_item.rs:115:28
@@ -490,6 +581,11 @@ error[E0121]: the type placeholder `_` is not allowed within types on item signa
490581
|
491582
LL | fn clone_from(&mut self, other: _) { *self = FnTest9; }
492583
| ^ not allowed in type signatures
584+
|
585+
help: use type parameters instead
586+
|
587+
LL | fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
588+
| ^^^ ^
493589

494590
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
495591
--> $DIR/typeck_type_placeholder_item.rs:201:14

0 commit comments

Comments
 (0)