File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5360,8 +5360,15 @@ impl<'a> Parser<'a> {
53605360 // Parse type argument.
53615361 let ty_param = self . parse_ty ( ) ?;
53625362 if seen_binding {
5363- self . span_err ( ty_param. span ,
5364- "type parameters must be declared prior to associated type bindings" ) ;
5363+ self . struct_span_err (
5364+ ty_param. span ,
5365+ "type parameters must be declared prior to associated type bindings"
5366+ )
5367+ . span_label (
5368+ ty_param. span ,
5369+ "must be declared prior to associated type bindings" ,
5370+ )
5371+ . emit ( ) ;
53655372 }
53665373 args. push ( GenericArg :: Type ( ty_param) ) ;
53675374 seen_type = true ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: type parameters must be declared prior to associated type bindings
22 --> $DIR/issue-32214.rs:5:34
33 |
44LL | pub fn test<W, I: Trait<Item=(), W> >() {}
5- | ^
5+ | ^ must be declared prior to associated type bindings
66
77error: aborting due to previous error
88
You can’t perform that action at this time.
0 commit comments