提交 0254f69d 编写于 作者: N Niko Matsakis

use fileline_ and not full span_ for the followon messages

上级 f9b5463a
......@@ -451,8 +451,8 @@ pub fn raw_struct_lint<'a>(sess: &'a Session,
let citation = format!("for more information, see {}",
future_incompatible.reference);
if let Some(sp) = span {
err.span_warn(sp, &explanation);
err.span_note(sp, &citation);
err.fileline_warn(sp, &explanation);
err.fileline_note(sp, &citation);
} else {
err.warn(&explanation);
err.note(&citation);
......
......@@ -200,6 +200,13 @@ pub fn span_end_note(&mut self ,
self.sub(Level::Note, msg, Some(sp), Some(EndSpan(sp)));
self
}
pub fn fileline_warn(&mut self ,
sp: Span,
msg: &str)
-> &mut DiagnosticBuilder<'a> {
self.sub(Level::Warning, msg, Some(sp), Some(FileLine(sp)));
self
}
pub fn fileline_note(&mut self ,
sp: Span,
msg: &str)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册