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 {
|
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 {
|
fn mk_span_handler(handler: handler, cm: codemap::codemap) -> span_handler {
|
||||||
|
@ -215,12 +215,18 @@ fn monitor(f: fn~(diagnostic::emitter)) {
|
|||||||
none,
|
none,
|
||||||
diagnostic::ice_msg("unexpected failure"),
|
diagnostic::ice_msg("unexpected failure"),
|
||||||
diagnostic::error);
|
diagnostic::error);
|
||||||
let note = "The compiler hit an unexpected failure path. \
|
|
||||||
This is a bug. Try running with \
|
for [
|
||||||
RUST_LOG=rustc=0,::rt::backtrace \
|
|
||||||
to get further details and report the results \
|
"the compiler hit an unexpected failure path. \
|
||||||
to github.com/mozilla/rust/issues";
|
this is a bug",
|
||||||
diagnostic::emit(none, note, diagnostic::note);
|
"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 so the process returns a failure code
|
||||||
fail;
|
fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user