mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc: Use a slightly more consistent style for unexpected errors
This commit is contained in:
parent
c01d05f18d
commit
dc117fecde
@ -105,7 +105,7 @@ impl codemap_handler of handler for handler_t {
|
||||
}
|
||||
|
||||
fn ice_msg(msg: str) -> str {
|
||||
#fmt["internal compiler error %s", msg]
|
||||
#fmt["internal compiler error: %s", msg]
|
||||
}
|
||||
|
||||
fn mk_span_handler(handler: handler, cm: codemap::codemap) -> span_handler {
|
||||
|
@ -215,12 +215,18 @@ fn monitor(f: fn~(diagnostic::emitter)) {
|
||||
none,
|
||||
diagnostic::ice_msg("unexpected failure"),
|
||||
diagnostic::error);
|
||||
let note = "The compiler hit an unexpected failure path. \
|
||||
This is a bug. Try running with \
|
||||
RUST_LOG=rustc=0,::rt::backtrace \
|
||||
to get further details and report the results \
|
||||
to github.com/mozilla/rust/issues";
|
||||
diagnostic::emit(none, note, diagnostic::note);
|
||||
|
||||
for [
|
||||
|
||||
"the compiler hit an unexpected failure path. \
|
||||
this is a bug",
|
||||
"try running with RUST_LOG=rustc=0,::rt::backtrace \
|
||||
to get further details and report the results \
|
||||
to github.com/mozilla/rust/issues"
|
||||
|
||||
].each {|note|
|
||||
diagnostic::emit(none, note, diagnostic::note)
|
||||
}
|
||||
}
|
||||
// Fail so the process returns a failure code
|
||||
fail;
|
||||
|
Loading…
Reference in New Issue
Block a user