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> {
5393
5393
// change we parse those generics now, but report an error.
5394
5394
if self . choose_generics_over_qpath ( ) {
5395
5395
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 ( ) ;
5398
5402
}
5399
5403
5400
5404
loop {
Original file line number Diff line number Diff line change 1
1
fn foo < T > ( ) where <T >:: Item : ToString , T : Iterator { }
2
2
//~^ ERROR generic parameters on `where` clauses are reserved for future use
3
+ //~| ERROR cannot find type `Item` in the crate root
3
4
4
5
fn 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
2
2
--> $DIR/where_with_bound.rs:1:19
3
3
|
4
4
LL | fn foo<T>() where <T>::Item: ToString, T: Iterator { }
5
- | ^^^
5
+ | ^^^ currently unsupported
6
6
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
8
14
15
+ For more information about this error, try `rustc --explain E0412`.
You can’t perform that action at this time.
0 commit comments