Add pluralise macro
Adress issue #64238. Create a macro to be used for pluralisation check throughout rustc codebase.
This commit is contained in:
parent
4a8ccdbeeb
commit
38ab20dbf7
1 changed files with 8 additions and 0 deletions
|
@ -845,3 +845,11 @@ impl Level {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! pluralise {
|
||||||
|
($x:expr) => {
|
||||||
|
if $x != 1 { "s" } else { "" }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue