Skip to content

Commit 5558c64

Browse files
committed
Change error count messages
See rust-lang#33525 for details.
1 parent 81734e0 commit 5558c64

File tree

248 files changed

+248
-252
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

+248
-252
lines changed

src/librustc_driver/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ const BUG_REPORT_URL: &'static str = "https://github.com/rust-lang/rust/blob/mas
118118
fn abort_msg(err_count: usize) -> String {
119119
match err_count {
120120
0 => "aborting with no errors (maybe a bug?)".to_owned(),
121-
1 => "aborting due to previous error".to_owned(),
122-
e => format!("aborting due to {} previous errors", e),
121+
_ => "aborting due to previous error(s)".to_owned(),
123122
}
124123
}
125124

src/librustc_errors/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,7 @@ impl Handler {
501501

502502
return;
503503
}
504-
1 => s = "aborting due to previous error".to_string(),
505-
_ => {
506-
s = format!("aborting due to {} previous errors", self.err_count.get());
507-
}
504+
_ => s = "aborting due to previous error(s)".to_string(),
508505
}
509506

510507
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
9+
error: aborting due to previous error(s)
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
10+
error: aborting due to previous error(s)
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 8 previous errors
49+
error: aborting due to previous error(s)
5050

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 3 previous errors
25+
error: aborting due to previous error(s)
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
9+
error: aborting due to previous error(s)
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
7+
error: aborting due to previous error(s)
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: 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
10+
error: aborting due to previous error(s)
1111

src/test/ui/codemap_tests/issue-11715.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ error[E0499]: cannot borrow `x` as mutable more than once at a time
88
101 | }
99
| - first borrow ends here
1010

11-
error: aborting due to previous error
11+
error: aborting due to previous error(s)
1212

0 commit comments

Comments
 (0)