diff options
| author | varkor <github@varkor.com> | 2019-09-06 19:21:20 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-09-06 19:21:20 +0100 |
| commit | f6481ed1c31d2a3c43fab73e58901f7c25360fcb (patch) | |
| tree | 734024c70db95eceafedd99b2011bb05b777bee7 /src/libsyntax/ext | |
| parent | 4894123d21ed4b153a2e5c32c0870cb2d97f9b46 (diff) | |
| download | rust-f6481ed1c31d2a3c43fab73e58901f7c25360fcb.tar.gz rust-f6481ed1c31d2a3c43fab73e58901f7c25360fcb.zip | |
Correct pluralisation of various diagnostic messages
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 9 |
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) } |
