diff options
| author | bors <bors@rust-lang.org> | 2015-05-27 02:15:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-05-27 02:15:44 +0000 |
| commit | a97b3ff16ffb7370642b674ce154a827bf69b8d8 (patch) | |
| tree | 80bf08fa3c522b35551442212c940f7ce821628a | |
| parent | e4c64a1499de8a14a34f77c844b7fc1f7cabffd6 (diff) | |
| parent | 1b3465cf9eb8063b22649a34ba780b17eb78b253 (diff) | |
| download | rust-a97b3ff16ffb7370642b674ce154a827bf69b8d8.tar.gz rust-a97b3ff16ffb7370642b674ce154a827bf69b8d8.zip | |
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.
| -rw-r--r-- | src/librustc_driver/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 2c0e1a05c3d..d91a26ed4ee 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -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, ¬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()); } |
