use pluralize!
This commit is contained in:
parent
3ae03e027a
commit
ddd326fda4
5 changed files with 10 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue