Skip to content

Commit 77f4022

Browse files
committed
Revert "Change error count messages"
This reverts commit 5558c64.
1 parent a5d34e1 commit 77f4022

File tree

248 files changed

+252
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+252
-248
lines changed

src/librustc_driver/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ const BUG_REPORT_URL: &'static str = "https://github.com/rust-lang/rust/blob/mas
113113
fn abort_msg(err_count: usize) -> String {
114114
match err_count {
115115
0 => "aborting with no errors (maybe a bug?)".to_owned(),
116-
_ => "aborting due to previous error(s)".to_owned(),
116+
1 => "aborting due to previous error".to_owned(),
117+
e => format!("aborting due to {} previous errors", e),
117118
}
118119
}
119120

src/librustc_errors/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@ impl Handler {
506506

507507
return;
508508
}
509-
_ => s = "aborting due to previous error(s)".to_string(),
509+
1 => s = "aborting due to previous error".to_string(),
510+
_ => {
511+
s = format!("aborting due to {} previous errors", self.err_count.get());
512+
}
510513
}
511514

512515
panic!(self.fatal(&s));

src/test/ui/borrowck/borrowck-in-static.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure
66
15 | Box::new(|| x) //~ ERROR cannot move out of captured outer variable
77
| ^ cannot move out of captured outer variable in an `Fn` closure
88

9-
error: aborting due to previous error(s)
9+
error: aborting due to previous error
1010

src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ error[E0507]: cannot move out of captured outer variable in an `Fn` closure
77
21 | y.into_iter();
88
| ^ cannot move out of captured outer variable in an `Fn` closure
99

10-
error: aborting due to previous error(s)
10+
error: aborting due to previous error
1111

src/test/ui/check_match/issue-35609.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 mor
4646
49 | match Some(A) {
4747
| ^^^^^^^ patterns `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
4848

49-
error: aborting due to previous error(s)
49+
error: aborting due to 8 previous errors
5050

src/test/ui/closure_context/issue-42065.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ note: closure cannot be invoked more than once because it moves the variable `di
1212
16 | for (key, value) in dict {
1313
| ^^^^
1414

15-
error: aborting due to previous error(s)
15+
error: aborting due to previous error
1616

src/test/ui/codemap_tests/bad-format-args.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ error: expected token: `,`
2222
|
2323
= note: this error originates in a macro outside of the current crate
2424

25-
error: aborting due to previous error(s)
25+
error: aborting due to 3 previous errors
2626

src/test/ui/codemap_tests/coherence-overlapping-inherent-impl-trait.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ error[E0592]: duplicate definitions with name `f`
66
15 | impl C { fn f() {} }
77
| --------- other definition for `f`
88

9-
error: aborting due to previous error(s)
9+
error: aborting due to previous error
1010

src/test/ui/codemap_tests/empty_span.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`,
44
17 | unsafe impl Send for &'static Foo { }
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error: aborting due to previous error(s)
7+
error: aborting due to previous error
88

src/test/ui/codemap_tests/huge_multispan_highlight.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ error[E0596]: cannot borrow immutable local variable `x` as mutable
77
100 | let y = &mut x;
88
| ^ cannot borrow mutably
99

10-
error: aborting due to previous error(s)
10+
error: aborting due to previous error
1111

0 commit comments

Comments
 (0)