Skip to content

Commit dc117fe

Browse files
committed
rustc: Use a slightly more consistent style for unexpected errors
1 parent c01d05f commit dc117fe

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/librustsyntax/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl codemap_handler of handler for handler_t {
105105
}
106106

107107
fn ice_msg(msg: str) -> str {
108-
#fmt["internal compiler error %s", msg]
108+
#fmt["internal compiler error: %s", msg]
109109
}
110110

111111
fn mk_span_handler(handler: handler, cm: codemap::codemap) -> span_handler {

src/rustc/driver/rustc.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,18 @@ fn monitor(f: fn~(diagnostic::emitter)) {
215215
none,
216216
diagnostic::ice_msg("unexpected failure"),
217217
diagnostic::error);
218-
let note = "The compiler hit an unexpected failure path. \
219-
This is a bug. Try running with \
220-
RUST_LOG=rustc=0,::rt::backtrace \
221-
to get further details and report the results \
222-
to github.com/mozilla/rust/issues";
223-
diagnostic::emit(none, note, diagnostic::note);
218+
219+
for [
220+
221+
"the compiler hit an unexpected failure path. \
222+
this is a bug",
223+
"try running with RUST_LOG=rustc=0,::rt::backtrace \
224+
to get further details and report the results \
225+
to github.com/mozilla/rust/issues"
226+
227+
].each {|note|
228+
diagnostic::emit(none, note, diagnostic::note)
229+
}
224230
}
225231
// Fail so the process returns a failure code
226232
fail;

0 commit comments

Comments
 (0)