File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -5393,8 +5393,12 @@ impl<'a> Parser<'a> {
53935393 // change we parse those generics now, but report an error.
53945394 if self . choose_generics_over_qpath ( ) {
53955395 let generics = self . parse_generics ( ) ?;
5396- self . span_err ( generics. span ,
5397- "generic parameters on `where` clauses are reserved for future use" ) ;
5396+ self . struct_span_err (
5397+ generics. span ,
5398+ "generic parameters on `where` clauses are reserved for future use" ,
5399+ )
5400+ . span_label ( generics. span , "currently unsupported" )
5401+ . emit ( ) ;
53985402 }
53995403
54005404 loop {
Original file line number Diff line number Diff line change 11fn foo < T > ( ) where <T >:: Item : ToString , T : Iterator { }
22//~^ ERROR generic parameters on `where` clauses are reserved for future use
3+ //~| ERROR cannot find type `Item` in the crate root
34
45fn main ( ) { }
Original file line number Diff line number Diff line change @@ -2,7 +2,14 @@ error: generic parameters on `where` clauses are reserved for future use
22 --> $DIR/where_with_bound.rs:1:19
33 |
44LL | fn foo<T>() where <T>::Item: ToString, T: Iterator { }
5- | ^^^
5+ | ^^^ currently unsupported
66
7- error: aborting due to previous error
7+ error[E0412]: cannot find type `Item` in the crate root
8+ --> $DIR/where_with_bound.rs:1:24
9+ |
10+ LL | fn foo<T>() where <T>::Item: ToString, T: Iterator { }
11+ | ^^^^ not found in the crate root
12+
13+ error: aborting due to 2 previous errors
814
15+ For more information about this error, try `rustc --explain E0412`.
You can’t perform that action at this time.
0 commit comments