Skip to content

Error count display is different when there's only one error left, making it difficult to scan output #12390

@carols10cents

Description

@carols10cents

Code

Take any code that doesn't compile with multiple errors, then fix them one at a time, running the compiler between each fix.

Current output

When there are 3 errors left, the compiler says:

error: could not compile `crate` (lib test) due to 3 previous errors

When there are 2 errors left, the compiler says:

error: could not compile `crate` (lib test) due to 2 previous errors

When there is 1 error left, the compiler says:

error: could not compile `crate` (lib test) due to previous error

Desired output

When there's only 1 error left, I wish the number 1 appeared in the output so that it scans the same as the output when there's more than 1 error, so:

error: could not compile `crate` (lib test) due to 1 previous error

Rationale and extra context

When I'm in a cycle of quickly going between edit -> compile -> see how many errors there are to ensure I'm making forward progress and see how much work is left -> edit, my brain goes to the due to previous error message looking for a digit. My brain also sees that there's clearly still error output, so it's saying "where's the count?!??! how many are left?!? what's going on?!?!" until my brain's flow is broken and it goes "oh right, this error message is different, there's 1 left".

It's a minor paper cut. Feel free to prioritize accordingly.

I'm using Rust stable 1.71.0.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Error and warning messages generated by Cargo itself.E-easyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions