File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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;
2020use syntax:: visit:: { self , Visitor } ;
2121use syntax:: { span_err, struct_span_err, walk_list} ;
2222use syntax_ext:: proc_macro_decls:: is_proc_macro_attr;
23- use syntax_pos:: Span ;
23+ use syntax_pos:: { Span , MultiSpan } ;
2424use errors:: Applicability ;
2525use log:: debug;
2626
@@ -682,7 +682,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
682682 ItemKind :: Existential ( ref bounds, _) => {
683683 if !bounds. iter ( )
684684 . 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" ) ;
686688 }
687689 }
688690 _ => { }
You can’t perform that action at this time.
0 commit comments