Only bump error count when we are sure that the diagnostic is not a repetition.
This ensures that if we emit the same diagnostic twice, the error count will match the real number of errors shown to the user. Fixes #42106
This commit is contained in:
parent
687d3d15ba
commit
063607eecb
8 changed files with 14 additions and 20 deletions
|
|
@ -42,5 +42,5 @@ error: stability attributes may not be used outside of the standard library
|
|||
35 | #[rustc_deprecated = "1500"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,5 @@ error: stability attributes may not be used outside of the standard library
|
|||
35 | #[stable = "1300"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,5 @@ error: stability attributes may not be used outside of the standard library
|
|||
35 | #[unstable = "1200"] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ error[E0502]: cannot borrow `*collection` as mutable because `collection` is als
|
|||
14 | }
|
||||
| - immutable borrow ends here
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ error: generic arguments in macro path
|
|||
20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path
|
||||
| ^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue