Add pluralise macro

Adress issue #64238. Create a macro to be used for pluralisation check
throughout rustc codebase.
This commit is contained in:
V1shvesh 2019-09-08 14:57:03 +05:30
parent 4a8ccdbeeb
commit 38ab20dbf7

View file

@ -845,3 +845,11 @@ impl Level {
}
}
}
#[macro_export]
macro_rules! pluralise {
($x:expr) => {
if $x != 1 { "s" } else { "" }
};
}