mirror of
https://github.com/rust-lang/cargo.git
synced 2026-04-11 20:44:19 +00:00
fix(lints): plural form correctly
This commit is contained in:
@@ -1348,10 +1348,8 @@ impl<'gctx> Workspace<'gctx> {
|
||||
}
|
||||
|
||||
if error_count > 0 {
|
||||
Err(crate::util::errors::AlreadyPrintedError::new(anyhow!(
|
||||
"encountered {error_count} errors(s) while running lints"
|
||||
))
|
||||
.into())
|
||||
let plural = if error_count == 1 { "" } else { "s" };
|
||||
bail!("encountered {error_count} error{plural} while running lints")
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ blanket_hint_mostly_unused = "deny"
|
||||
|
|
||||
7 | [profile.dev.package.<pkg_name>]
|
||||
| +++++++++++++++++++
|
||||
[ERROR] encountered 1 error while running lints
|
||||
|
||||
"#]])
|
||||
.run();
|
||||
|
||||
Reference in New Issue
Block a user