about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-07 08:06:11 +0200
committerGitHub <noreply@github.com>2019-09-07 08:06:11 +0200
commitd5caeac0964c0ce23e38e1bf75706fedbf1cd32c (patch)
tree0ae5ee3328672bf878bc4dcd1f9d00776374948b /src/libsyntax/ext
parent84cb3529b627e8ae034237156c04bdad84ea8b61 (diff)
parent0b97726e6c524d2cc0de4c2f5b1284eca010a7b2 (diff)
downloadrust-d5caeac0964c0ce23e38e1bf75706fedbf1cd32c.tar.gz
rust-d5caeac0964c0ce23e38e1bf75706fedbf1cd32c.zip
Rollup merge of #64233 - varkor:correct-pluralisation, r=estebank
Correct pluralisation of various diagnostic messages
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 30d5df13dce..23735727fe8 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -345,8 +345,13 @@ impl LockstepIterSize {
                 LockstepIterSize::Constraint(r_len, _) if l_len == r_len => self,
                 LockstepIterSize::Constraint(r_len, r_id) => {
                     let msg = format!(
-                        "meta-variable `{}` repeats {} times, but `{}` repeats {} times",
-                        l_id, l_len, r_id, r_len
+                        "meta-variable `{}` repeats {} time{}, but `{}` repeats {} time{}",
+                        l_id,
+                        l_len,
+                        if l_len != 1 { "s" } else { "" },
+                        r_id,
+                        r_len,
+                        if r_len != 1 { "s" } else { "" },
                     );
                     LockstepIterSize::Contradiction(msg)
                 }