Skip to content

Commit 37b2813

Browse files
committed
Auto merge of rust-lang#118138 - Nilstrieb:one-previous-error, r=WaffleLapkin
Fixes error count display is different when there's only one error left Supersedes rust-lang#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 rust-lang#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 0f696e5 + c73d392 commit 37b2813

File tree

5,757 files changed

+5766
-5759
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,757 files changed

+5766
-5759
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
@@ -1927,7 +1927,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
19271927
/// 8 | foo::Foo {};
19281928
/// | ^^^^^^^^ missing `you_can_use_this_field`
19291929
///
1930-
/// error: aborting due to previous error
1930+
/// error: aborting due to 1 previous error
19311931
/// ```
19321932
fn report_missing_fields(
19331933
&self,
@@ -2044,7 +2044,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20442044
/// 8 | foo::Foo {};
20452045
/// | ^^^^^^^^
20462046
///
2047-
/// error: aborting due to previous error
2047+
/// error: aborting due to 1 previous error
20482048
/// ```
20492049
fn report_private_fields(
20502050
&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)