diff options
| author | gaolei <gaolei@zhihu.com> | 2019-09-19 15:13:40 +0800 |
|---|---|---|
| committer | gaolei <gaolei@zhihu.com> | 2019-09-20 00:25:27 +0800 |
| commit | 1ab5593f951c07a6f0ed05fbbfe8f262863158a0 (patch) | |
| tree | 75025d763369bc6d4c99b5023ad37a3d2502908d /src/libsyntax/ext | |
| parent | 19d070393c05da7dfa1948f17872e55603a8c359 (diff) | |
| download | rust-1ab5593f951c07a6f0ed05fbbfe8f262863158a0.tar.gz rust-1ab5593f951c07a6f0ed05fbbfe8f262863158a0.zip | |
factor out pluralisation remains after #64280
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 23735727fe8..f9c07e3a2e4 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -8,6 +8,7 @@ use crate::tokenstream::{DelimSpan, TokenStream, TokenTree, TreeAndJoint}; use smallvec::{smallvec, SmallVec}; +use errors::pluralise; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::sync::Lrc; use syntax_pos::hygiene::{ExpnId, Transparency}; @@ -348,10 +349,10 @@ impl LockstepIterSize { "meta-variable `{}` repeats {} time{}, but `{}` repeats {} time{}", l_id, l_len, - if l_len != 1 { "s" } else { "" }, + pluralise!(l_len), r_id, r_len, - if r_len != 1 { "s" } else { "" }, + pluralise!(r_len), ); LockstepIterSize::Contradiction(msg) } |
