diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-27 10:09:06 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2022-07-27 10:09:06 +0900 |
| commit | ddd326fda4358df67f1efa185e1f16e9acf3d234 (patch) | |
| tree | a0a57e75b9128f129df11526d53fec67b97d385a /compiler/rustc_trait_selection/src | |
| parent | 3ae03e027a66744e934a7bfa7127256489bed3c2 (diff) | |
| download | rust-ddd326fda4358df67f1efa185e1f16e9acf3d234.tar.gz rust-ddd326fda4358df67f1efa185e1f16e9acf3d234.zip | |
use `pluralize!`
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 2f92a77a795..0c38c829760 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -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) { |
