@@ -11,25 +11,25 @@ LL | trait BadTrait<_> {}
11
11
| ^ expected identifier, found reserved identifier
12
12
13
13
error: expected identifier, found reserved identifier `_`
14
- --> $DIR/typeck_type_placeholder_item.rs:166 :19
14
+ --> $DIR/typeck_type_placeholder_item.rs:169 :19
15
15
|
16
16
LL | struct BadStruct1<_, _>(_);
17
17
| ^ expected identifier, found reserved identifier
18
18
19
19
error: expected identifier, found reserved identifier `_`
20
- --> $DIR/typeck_type_placeholder_item.rs:166 :22
20
+ --> $DIR/typeck_type_placeholder_item.rs:169 :22
21
21
|
22
22
LL | struct BadStruct1<_, _>(_);
23
23
| ^ expected identifier, found reserved identifier
24
24
25
25
error: expected identifier, found reserved identifier `_`
26
- --> $DIR/typeck_type_placeholder_item.rs:171 :19
26
+ --> $DIR/typeck_type_placeholder_item.rs:174 :19
27
27
|
28
28
LL | struct BadStruct2<_, T>(_, T);
29
29
| ^ expected identifier, found reserved identifier
30
30
31
31
error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters
32
- --> $DIR/typeck_type_placeholder_item.rs:166 :22
32
+ --> $DIR/typeck_type_placeholder_item.rs:169 :22
33
33
|
34
34
LL | struct BadStruct1<_, _>(_);
35
35
| - ^ already used
@@ -343,6 +343,18 @@ help: use type parameters instead
343
343
LL | struct BadStruct<T>(T);
344
344
| ^ ^
345
345
346
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
347
+ --> $DIR/typeck_type_placeholder_item.rs:158:32
348
+ |
349
+ LL | impl BadTrait<_> for BadStruct<_> {}
350
+ | ^ not allowed in type signatures
351
+
352
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
353
+ --> $DIR/typeck_type_placeholder_item.rs:158:15
354
+ |
355
+ LL | impl BadTrait<_> for BadStruct<_> {}
356
+ | ^ not allowed in type signatures
357
+
346
358
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
347
359
--> $DIR/typeck_type_placeholder_item.rs:158:15
348
360
|
@@ -357,13 +369,13 @@ LL | impl<T> BadTrait<T> for BadStruct<T> {}
357
369
| ^^^ ^ ^
358
370
359
371
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
360
- --> $DIR/typeck_type_placeholder_item.rs:161 :34
372
+ --> $DIR/typeck_type_placeholder_item.rs:163 :34
361
373
|
362
374
LL | fn impl_trait() -> impl BadTrait<_> {
363
375
| ^ not allowed in type signatures
364
376
365
377
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
366
- --> $DIR/typeck_type_placeholder_item.rs:166 :25
378
+ --> $DIR/typeck_type_placeholder_item.rs:169 :25
367
379
|
368
380
LL | struct BadStruct1<_, _>(_);
369
381
| ^ not allowed in type signatures
@@ -374,7 +386,7 @@ LL | struct BadStruct1<T, _>(T);
374
386
| ^ ^
375
387
376
388
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
377
- --> $DIR/typeck_type_placeholder_item.rs:171 :25
389
+ --> $DIR/typeck_type_placeholder_item.rs:174 :25
378
390
|
379
391
LL | struct BadStruct2<_, T>(_, T);
380
392
| ^ not allowed in type signatures
@@ -385,7 +397,13 @@ LL | struct BadStruct2<K, T>(K, T);
385
397
| ^ ^
386
398
387
399
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
388
- --> $DIR/typeck_type_placeholder_item.rs:175:14
400
+ --> $DIR/typeck_type_placeholder_item.rs:178:14
401
+ |
402
+ LL | type X = Box<_>;
403
+ | ^ not allowed in type signatures
404
+
405
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
406
+ --> $DIR/typeck_type_placeholder_item.rs:178:14
389
407
|
390
408
LL | type X = Box<_>;
391
409
| ^ not allowed in type signatures
@@ -505,7 +523,19 @@ LL | fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
505
523
| ^^^ ^
506
524
507
525
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
508
- --> $DIR/typeck_type_placeholder_item.rs:181:21
526
+ --> $DIR/typeck_type_placeholder_item.rs:163:34
527
+ |
528
+ LL | fn impl_trait() -> impl BadTrait<_> {
529
+ | ^ not allowed in type signatures
530
+
531
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
532
+ --> $DIR/typeck_type_placeholder_item.rs:185:21
533
+ |
534
+ LL | type Y = impl Trait<_>;
535
+ | ^ not allowed in type signatures
536
+
537
+ error[E0121]: the type placeholder `_` is not allowed within types on item signatures
538
+ --> $DIR/typeck_type_placeholder_item.rs:185:21
509
539
|
510
540
LL | type Y = impl Trait<_>;
511
541
| ^ not allowed in type signatures
@@ -546,7 +576,7 @@ LL | fn clone(&self) -> _ { FnTest9 }
546
576
| not allowed in type signatures
547
577
| help: replace with the correct return type: `main::FnTest9`
548
578
549
- error: aborting due to 58 previous errors
579
+ error: aborting due to 63 previous errors
550
580
551
581
Some errors have detailed explanations: E0121, E0282, E0403.
552
582
For more information about an error, try `rustc --explain E0121`.
0 commit comments