Auto merge of #25741 - richo:backtrace-message, r=alexcrichton
The second commit seems reasonable to me but I can remove if it's contentious. The first is purely cosmetic but has been irking me for ages.
This commit is contained in:
commit
a97b3ff16f
@ -831,11 +831,14 @@ pub fn monitor<F:FnOnce()+Send+'static>(f: F) {
|
|||||||
"the compiler unexpectedly panicked. this is a bug.".to_string(),
|
"the compiler unexpectedly panicked. this is a bug.".to_string(),
|
||||||
format!("we would appreciate a bug report: {}",
|
format!("we would appreciate a bug report: {}",
|
||||||
BUG_REPORT_URL),
|
BUG_REPORT_URL),
|
||||||
"run with `RUST_BACKTRACE=1` for a backtrace".to_string(),
|
|
||||||
];
|
];
|
||||||
for note in &xs {
|
for note in &xs {
|
||||||
emitter.emit(None, ¬e[..], None, diagnostic::Note)
|
emitter.emit(None, ¬e[..], None, diagnostic::Note)
|
||||||
}
|
}
|
||||||
|
if let None = env::var_os("RUST_BACKTRACE") {
|
||||||
|
emitter.emit(None, "run with `RUST_BACKTRACE=1` for a backtrace",
|
||||||
|
None, diagnostic::Note);
|
||||||
|
}
|
||||||
|
|
||||||
println!("{}", str::from_utf8(&data.lock().unwrap()).unwrap());
|
println!("{}", str::from_utf8(&data.lock().unwrap()).unwrap());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user