1
Fork 0

use pluralize!

This commit is contained in:
Takayuki Maeda 2022-07-27 10:09:06 +09:00
parent 3ae03e027a
commit ddd326fda4
5 changed files with 10 additions and 12 deletions

View file

@ -634,9 +634,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
&format!(
"expected a closure taking {} argument{}, but one taking {} argument{} was given",
given.len(),
if given.len() == 1 { "" } else { "s" },
pluralize!(given.len()),
expected.len(),
if expected.len() == 1 { "" } else { "s" },
pluralize!(expected.len()),
)
);
} else if !self.same_type_modulo_infer(given_ty, expected_ty) {