Remove ordinalize.

Some minor (English only) heroics are performed to print error messages
like "5th rule of macro `m` is never used". The form "rule #5 of macro
`m` is never used" is just as good and much simpler to implement.
This commit is contained in:
Nicholas Nethercote 2024-05-10 15:34:12 +10:00
parent 7cbb736a60
commit 5134a04eaa
9 changed files with 19 additions and 77 deletions

View file

@ -327,11 +327,7 @@ impl<'a, 'tcx> ResolverExpand for Resolver<'a, 'tcx> {
UNUSED_MACRO_RULES,
node_id,
rule_span,
format!(
"{} rule of macro `{}` is never used",
crate::diagnostics::ordinalize(arm_i + 1),
ident.name
),
format!("rule #{} of macro `{}` is never used", arm_i + 1, ident.name),
);
}
}