rustc: Use a slightly more consistent style for unexpected errors

This commit is contained in:
Brian Anderson 2012-04-28 16:38:06 -07:00
parent c01d05f18d
commit dc117fecde
2 changed files with 13 additions and 7 deletions

View File

@ -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 {

View File

@ -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;