File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use syntax::ptr::P;
20
20
use syntax:: visit:: { self , Visitor } ;
21
21
use syntax:: { span_err, struct_span_err, walk_list} ;
22
22
use syntax_ext:: proc_macro_decls:: is_proc_macro_attr;
23
- use syntax_pos:: Span ;
23
+ use syntax_pos:: { Span , MultiSpan } ;
24
24
use errors:: Applicability ;
25
25
use log:: debug;
26
26
@@ -682,7 +682,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
682
682
ItemKind :: Existential ( ref bounds, _) => {
683
683
if !bounds. iter ( )
684
684
. any ( |b| if let GenericBound :: Trait ( ..) = * b { true } else { false } ) {
685
- self . err_handler ( ) . span_err ( item. span , "at least one trait must be specified" ) ;
685
+ let msp = MultiSpan :: from_spans ( bounds. iter ( )
686
+ . map ( |bound| bound. span ( ) ) . collect ( ) ) ;
687
+ self . err_handler ( ) . span_err ( msp, "at least one trait must be specified" ) ;
686
688
}
687
689
}
688
690
_ => { }
You can’t perform that action at this time.
0 commit comments