Skip to content

Commit 8d515ab

Browse files
committed
Auto merge of #118138 - Nilstrieb:one-previous-error, r=WaffleLapkin
Fixes error count display is different when there's only one error left Supersedes #114759 ### What did I do? I did the small change in `rustc_errors` by hand. Then I did the other changes in `/compiler` by hand, those were just find replace on `*.rs` in the workspace. The changes in run-make are find replace for `run-make` in the workspace. All other changes are blessed using `x test TEST --bless`. I blessed the tests that were blessed in #114759. ### how to review this nightmare ping bors with an `r+`. You should check that my logic is sound and maybe quickly scroll through the diff, but fully verifying it seems fairly hard to impossible. I did my best to do this correctly. Thank you `@adrianEffe` for bringing this up and your initial implementation. cc `@flip1995,` you said you want to do a subtree sync asap cc `@RalfJung` maybe you want to do a quick subtree sync afterwards as well for Miri r? `@WaffleLapkin`
2 parents 2f8d81f + 524fcb2 commit 8d515ab

File tree

5,756 files changed

+5757
-5757
lines changed

Some content is hidden

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

5,756 files changed

+5757
-5757
lines changed

compiler/rustc_errors/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ impl HandlerInner {
14651465
};
14661466
let errors = match self.deduplicated_err_count {
14671467
0 => Cow::from(""),
1468-
1 => Cow::from("aborting due to previous error"),
1468+
1 => Cow::from("aborting due to 1 previous error"),
14691469
count => Cow::from(format!("aborting due to {count} previous errors")),
14701470
};
14711471
if self.treat_err_as_bug() {

compiler/rustc_hir_typeck/src/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
19361936
/// 8 | foo::Foo {};
19371937
/// | ^^^^^^^^ missing `you_can_use_this_field`
19381938
///
1939-
/// error: aborting due to previous error
1939+
/// error: aborting due to 1 previous error
19401940
/// ```
19411941
fn report_missing_fields(
19421942
&self,
@@ -2053,7 +2053,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20532053
/// 8 | foo::Foo {};
20542054
/// | ^^^^^^^^
20552055
///
2056-
/// error: aborting due to previous error
2056+
/// error: aborting due to 1 previous error
20572057
/// ```
20582058
fn report_private_fields(
20592059
&self,

library/core/src/intrinsics/mir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
//! 27 | | )
194194
//! | |_____- binding declared here but left uninitialized
195195
//!
196-
//! error: aborting due to previous error
196+
//! error: aborting due to 1 previous error
197197
//!
198198
//! For more information about this error, try `rustc --explain E0381`.
199199
//! ```

src/tools/clippy/tests/ui-internal/default_deprecation_reason.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ LL | #![deny(clippy::internal)]
1818
= note: `#[deny(clippy::default_deprecation_reason)]` implied by `#[deny(clippy::internal)]`
1919
= note: this error originates in the macro `declare_deprecated_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
2020

21-
error: aborting due to previous error
21+
error: aborting due to 1 previous error
2222

src/tools/clippy/tests/ui-internal/default_lint.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ LL | #![deny(clippy::internal)]
1717
= note: `#[deny(clippy::default_lint)]` implied by `#[deny(clippy::internal)]`
1818
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
1919

20-
error: aborting due to previous error
20+
error: aborting due to 1 previous error
2121

src/tools/clippy/tests/ui-internal/lint_without_lint_pass.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ LL | #![deny(clippy::internal)]
1717
= note: `#[deny(clippy::lint_without_lint_pass)]` implied by `#[deny(clippy::internal)]`
1818
= note: this error originates in the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
1919

20-
error: aborting due to previous error
20+
error: aborting due to 1 previous error
2121

src/tools/clippy/tests/ui-internal/outer_expn_data.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ LL | #![deny(clippy::internal)]
1111
| ^^^^^^^^^^^^^^^^
1212
= note: `#[deny(clippy::outer_expn_expn_data)]` implied by `#[deny(clippy::internal)]`
1313

14-
error: aborting due to previous error
14+
error: aborting due to 1 previous error
1515

src/tools/clippy/tests/ui-toml/bad_toml/conf_bad_toml.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ error: error reading Clippy's configuration file: expected `.`, `=`
44
LL | fn this_is_obviously(not: a, toml: file) {
55
| ^
66

7-
error: aborting due to previous error
7+
error: aborting due to 1 previous error
88

src/tools/clippy/tests/ui-toml/bad_toml_type/conf_bad_type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ error: error reading Clippy's configuration file: invalid type: integer `42`, ex
44
LL | disallowed-names = 42
55
| ^^
66

7-
error: aborting due to previous error
7+
error: aborting due to 1 previous error
88

src/tools/clippy/tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ LL | fn cognitive_complexity() {
2020
= note: `-D clippy::cognitive-complexity` implied by `-D warnings`
2121
= help: to override `-D warnings` add `#[allow(clippy::cognitive_complexity)]`
2222

23-
error: aborting due to previous error; 2 warnings emitted
23+
error: aborting due to 1 previous error; 2 warnings emitted
2424

0 commit comments

Comments
 (0)