Support other types of pluralization in pluralize macro
This commit is contained in:
parent
bce19cf7f1
commit
3bf9124f14
8 changed files with 26 additions and 23 deletions
|
@ -504,9 +504,9 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
|
|||
for sp in spans {
|
||||
let msg = if sp == last_bound_span {
|
||||
format!(
|
||||
"...because of {} bound{}",
|
||||
if bounds.len() <= 2 { "this" } else { "these" },
|
||||
if bounds.len() <= 2 { "" } else { "s" },
|
||||
"...because of {these} bound{s}",
|
||||
these = pluralize!("this", bounds.len() - 1),
|
||||
s = pluralize!(bounds.len() - 1),
|
||||
)
|
||||
} else {
|
||||
String::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue