Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 41e8d15

Browse files
NoratriebadrianEffe
andcommittedNov 24, 2023
Show number in error message even for one error
Co-authored-by: Adrian <[email protected]>
1 parent 4fd68eb commit 41e8d15

File tree

5,025 files changed

+5026
-5026
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,025 files changed

+5026
-5026
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
@@ -1932,7 +1932,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
19321932
/// 8 | foo::Foo {};
19331933
/// | ^^^^^^^^ missing `you_can_use_this_field`
19341934
///
1935-
/// error: aborting due to previous error
1935+
/// error: aborting due to 1 previous error
19361936
/// ```
19371937
fn report_missing_fields(
19381938
&self,
@@ -2049,7 +2049,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20492049
/// 8 | foo::Foo {};
20502050
/// | ^^^^^^^^
20512051
///
2052-
/// error: aborting due to previous error
2052+
/// error: aborting due to 1 previous error
20532053
/// ```
20542054
fn report_private_fields(
20552055
&self,

0 commit comments

Comments
 (0)
Please sign in to comment.