mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Suppress the macro backtrace for fileline_note
and fileline_help
.
This commit is contained in:
parent
5a8f102bf6
commit
fab3295cba
@ -871,7 +871,7 @@ impl CodeMap {
|
||||
F: FnOnce(Option<&ExpnInfo>) -> T,
|
||||
{
|
||||
match id {
|
||||
NO_EXPANSION => f(None),
|
||||
NO_EXPANSION | COMMAND_LINE_EXPN => f(None),
|
||||
ExpnId(i) => f(Some(&(*self.expansions.borrow())[i as usize]))
|
||||
}
|
||||
}
|
||||
|
@ -465,22 +465,21 @@ fn emit(dst: &mut EmitterWriter, cm: &codemap::CodeMap, rsp: RenderSpan,
|
||||
match rsp {
|
||||
FullSpan(_) => {
|
||||
try!(highlight_lines(dst, cm, sp, lvl, cm.span_to_lines(sp)));
|
||||
try!(print_macro_backtrace(dst, cm, sp));
|
||||
}
|
||||
EndSpan(_) => {
|
||||
try!(end_highlight_lines(dst, cm, sp, lvl, cm.span_to_lines(sp)));
|
||||
try!(print_macro_backtrace(dst, cm, sp));
|
||||
}
|
||||
Suggestion(_, ref suggestion) => {
|
||||
try!(highlight_suggestion(dst, cm, sp, suggestion));
|
||||
try!(print_macro_backtrace(dst, cm, sp));
|
||||
}
|
||||
FileLine(..) => {
|
||||
// no source text in this case!
|
||||
}
|
||||
}
|
||||
|
||||
if sp != COMMAND_LINE_SP {
|
||||
try!(print_macro_backtrace(dst, cm, sp));
|
||||
}
|
||||
|
||||
match code {
|
||||
Some(code) =>
|
||||
match dst.registry.as_ref().and_then(|registry| registry.find_description(code)) {
|
||||
|
Loading…
Reference in New Issue
Block a user