File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -451,8 +451,8 @@ pub fn raw_struct_lint<'a>(sess: &'a Session,
451
451
let citation = format ! ( "for more information, see {}" ,
452
452
future_incompatible. reference) ;
453
453
if let Some ( sp) = span {
454
- err. span_warn ( sp, & explanation) ;
455
- err. span_note ( sp, & citation) ;
454
+ err. fileline_warn ( sp, & explanation) ;
455
+ err. fileline_note ( sp, & citation) ;
456
456
} else {
457
457
err. warn ( & explanation) ;
458
458
err. note ( & citation) ;
Original file line number Diff line number Diff line change @@ -200,6 +200,13 @@ impl<'a> DiagnosticBuilder<'a> {
200
200
self . sub ( Level :: Note , msg, Some ( sp) , Some ( EndSpan ( sp) ) ) ;
201
201
self
202
202
}
203
+ pub fn fileline_warn ( & mut self ,
204
+ sp : Span ,
205
+ msg : & str )
206
+ -> & mut DiagnosticBuilder < ' a > {
207
+ self . sub ( Level :: Warning , msg, Some ( sp) , Some ( FileLine ( sp) ) ) ;
208
+ self
209
+ }
203
210
pub fn fileline_note ( & mut self ,
204
211
sp : Span ,
205
212
msg : & str )
You can’t perform that action at this time.
0 commit comments