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:
bors 2015-05-27 02:15:44 +00:00
commit a97b3ff16f
1 changed files with 4 additions and 1 deletions

View File

@ -831,11 +831,14 @@ pub fn monitor<F:FnOnce()+Send+'static>(f: F) {
"the compiler unexpectedly panicked. this is a bug.".to_string(),
format!("we would appreciate a bug report: {}",
BUG_REPORT_URL),
"run with `RUST_BACKTRACE=1` for a backtrace".to_string(),
];
for note in &xs {
emitter.emit(None, &note[..], 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());
}