Skip to content

Commit 793e3b2

Browse files
committed
rustc: Output a note about how to debug unexpected failures
1 parent cb8eaba commit 793e3b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/comp/driver/rustc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ fn monitor(f: fn~(diagnostic::emitter)) {
164164
none,
165165
diagnostic::ice_msg("unexpected failure"),
166166
diagnostic::error);
167+
let note = "The compiler hit an unexpected failure path. \
168+
This is a bug. Try running with \
169+
RUST_LOG=rustc=0,::rt::backtrace \
170+
to get further details and report the results \
171+
to github.com/mozilla/rust/issues";
172+
diagnostic::emit(none, note, diagnostic::note);
167173
}
168174
// Fail so the process returns a failure code
169175
fail;

0 commit comments

Comments
 (0)