@@ -11,25 +11,25 @@ LL | trait BadTrait<_> {}
1111 | ^ expected identifier, found reserved identifier
1212
1313error: expected identifier, found reserved identifier `_`
14- --> $DIR/typeck_type_placeholder_item.rs:166 :19
14+ --> $DIR/typeck_type_placeholder_item.rs:169 :19
1515 |
1616LL | struct BadStruct1<_, _>(_);
1717 | ^ expected identifier, found reserved identifier
1818
1919error: expected identifier, found reserved identifier `_`
20- --> $DIR/typeck_type_placeholder_item.rs:166 :22
20+ --> $DIR/typeck_type_placeholder_item.rs:169 :22
2121 |
2222LL | struct BadStruct1<_, _>(_);
2323 | ^ expected identifier, found reserved identifier
2424
2525error: expected identifier, found reserved identifier `_`
26- --> $DIR/typeck_type_placeholder_item.rs:171 :19
26+ --> $DIR/typeck_type_placeholder_item.rs:174 :19
2727 |
2828LL | struct BadStruct2<_, T>(_, T);
2929 | ^ expected identifier, found reserved identifier
3030
3131error[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
3333 |
3434LL | struct BadStruct1<_, _>(_);
3535 | - ^ already used
@@ -343,6 +343,18 @@ help: use type parameters instead
343343LL | struct BadStruct<T>(T);
344344 | ^ ^
345345
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+
346358error[E0121]: the type placeholder `_` is not allowed within types on item signatures
347359 --> $DIR/typeck_type_placeholder_item.rs:158:15
348360 |
@@ -357,13 +369,13 @@ LL | impl<T> BadTrait<T> for BadStruct<T> {}
357369 | ^^^ ^ ^
358370
359371error[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
361373 |
362374LL | fn impl_trait() -> impl BadTrait<_> {
363375 | ^ not allowed in type signatures
364376
365377error[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
367379 |
368380LL | struct BadStruct1<_, _>(_);
369381 | ^ not allowed in type signatures
@@ -374,7 +386,7 @@ LL | struct BadStruct1<T, _>(T);
374386 | ^ ^
375387
376388error[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
378390 |
379391LL | struct BadStruct2<_, T>(_, T);
380392 | ^ not allowed in type signatures
@@ -385,7 +397,13 @@ LL | struct BadStruct2<K, T>(K, T);
385397 | ^ ^
386398
387399error[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
389407 |
390408LL | type X = Box<_>;
391409 | ^ not allowed in type signatures
@@ -505,7 +523,19 @@ LL | fn clone_from<T>(&mut self, other: T) { *self = FnTest9; }
505523 | ^^^ ^
506524
507525error[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
509539 |
510540LL | type Y = impl Trait<_>;
511541 | ^ not allowed in type signatures
@@ -546,7 +576,7 @@ LL | fn clone(&self) -> _ { FnTest9 }
546576 | not allowed in type signatures
547577 | help: replace with the correct return type: `main::FnTest9`
548578
549- error: aborting due to 58 previous errors
579+ error: aborting due to 63 previous errors
550580
551581Some errors have detailed explanations: E0121, E0282, E0403.
552582For more information about an error, try `rustc --explain E0121`.
0 commit comments