about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorgaolei <gaolei@zhihu.com>2019-09-19 15:13:40 +0800
committergaolei <gaolei@zhihu.com>2019-09-20 00:25:27 +0800
commit1ab5593f951c07a6f0ed05fbbfe8f262863158a0 (patch)
tree75025d763369bc6d4c99b5023ad37a3d2502908d /src/libsyntax/ext
parent19d070393c05da7dfa1948f17872e55603a8c359 (diff)
downloadrust-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.rs5
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)
                 }