diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-07-27 19:05:36 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-27 19:05:36 +0900 |
| commit | e0f88b3e9cd95d5e432f94d7c56e6cf62d388e92 (patch) | |
| tree | 491ec344c10606fe590b2a2519b8c838c9769db6 /compiler/rustc_trait_selection/src/traits | |
| parent | d425979f439a4f80523f8cc9ddc30f5a8c73256d (diff) | |
| parent | ddd326fda4358df67f1efa185e1f16e9acf3d234 (diff) | |
| download | rust-e0f88b3e9cd95d5e432f94d7c56e6cf62d388e92.tar.gz rust-e0f88b3e9cd95d5e432f94d7c56e6cf62d388e92.zip | |
Rollup merge of #99789 - TaKO8Ki:use-pluralize-macro, r=compiler-errors
Refactor: use `pluralize!` Use `pluralize!` in more places
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -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 c77540b2f46..25ba520ace2 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -631,9 +631,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) { |
