about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-03-14 17:55:14 +0100
committerest31 <MTest31@outlook.com>2022-03-15 15:37:49 +0100
commit3bf9124f14f68f8c3cd26dd27d0ef27c516a5f06 (patch)
tree514047e6dbfc97972aee02110fc0a89ab493992c /compiler/rustc_resolve/src
parentbce19cf7f19ee5729defaccc86b068cc3c206c9c (diff)
downloadrust-3bf9124f14f68f8c3cd26dd27d0ef27c516a5f06.tar.gz
rust-3bf9124f14f68f8c3cd26dd27d0ef27c516a5f06.zip
Support other types of pluralization in pluralize macro
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index 9e38428660e..8dec28c8ae2 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -504,9 +504,9 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
                     for sp in spans {
                         let msg = if sp == last_bound_span {
                             format!(
-                                "...because of {} bound{}",
-                                if bounds.len() <= 2 { "this" } else { "these" },
-                                if bounds.len() <= 2 { "" } else { "s" },
+                                "...because of {these} bound{s}",
+                                these = pluralize!("this", bounds.len() - 1),
+                                s = pluralize!(bounds.len() - 1),
                             )
                         } else {
                             String::new()