Rollup merge of #94958 - est31:pluralize, r=oli-obk
Support other types of pluralization in pluralize macro
This commit is contained in:
commit
183262d8d3
8 changed files with 26 additions and 23 deletions
|
@ -20,6 +20,12 @@ macro_rules! pluralize {
|
|||
($x:expr) => {
|
||||
if $x != 1 { "s" } else { "" }
|
||||
};
|
||||
("is", $x:expr) => {
|
||||
if $x == 1 { "is" } else { "are" }
|
||||
};
|
||||
("this", $x:expr) => {
|
||||
if $x == 1 { "this" } else { "these" }
|
||||
};
|
||||
}
|
||||
|
||||
/// Indicates the confidence in the correctness of a suggestion.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue