Skip to content

Commit 1a3b8fc

Browse files
committed
Have "aborting due to previous errors" message show an error count
1 parent 99d6807 commit 1a3b8fc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn check_expected_errors(expected_errors: [errors::expected_error],
266266
}
267267

268268
// ignore this msg which gets printed at the end
269-
if str::contains(line, "aborting due to previous errors") {
269+
if str::contains(line, "aborting due to") {
270270
was_expected = true;
271271
}
272272

src/libsyntax/diagnostic.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ impl codemap_handler of handler for handler_t {
8787
fn has_errors() -> bool { self.err_count > 0u }
8888
fn abort_if_errors() {
8989
if self.err_count > 0u {
90-
self.fatal("aborting due to previous errors");
90+
let s = #fmt["aborting due to %u previous errors",
91+
self.err_count];
92+
self.fatal(s);
9193
}
9294
}
9395
fn warn(msg: str) {

0 commit comments

Comments
 (0)