diff options
| author | bors <bors@rust-lang.org> | 2023-11-24 21:40:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-24 21:40:54 +0000 |
| commit | 37b2813a7be580ef59048a6bd08444c79e5cc97f (patch) | |
| tree | ca128703ba533ad8f1b98e29c4bfe297d7914554 /compiler/rustc_errors/src | |
| parent | 0f696e555f180bad960fdea8339c3a9b9edf844f (diff) | |
| parent | c73d392a01f26c8f83102b12e4d66d5a8d1f558b (diff) | |
| download | rust-37b2813a7be580ef59048a6bd08444c79e5cc97f.tar.gz rust-37b2813a7be580ef59048a6bd08444c79e5cc97f.zip | |
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`
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 1cee57843f0..a3cda5aeab5 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1465,7 +1465,7 @@ impl HandlerInner { }; let errors = match self.deduplicated_err_count { 0 => Cow::from(""), - 1 => Cow::from("aborting due to previous error"), + 1 => Cow::from("aborting due to 1 previous error"), count => Cow::from(format!("aborting due to {count} previous errors")), }; if self.treat_err_as_bug() { |
