diff options
| author | est31 <MTest31@outlook.com> | 2022-05-13 08:48:35 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-05-13 08:48:35 +0200 |
| commit | e6ccf9b5d8e56d08936cd77f1bb72abd5e2582ed (patch) | |
| tree | ffc8b8a9693e77b11fba4e94216ba6efcbf0ea99 | |
| parent | cc3c5d2700481bae497d6cde825c1d48e79c776a (diff) | |
| download | rust-e6ccf9b5d8e56d08936cd77f1bb72abd5e2582ed.tar.gz rust-e6ccf9b5d8e56d08936cd77f1bb72abd5e2582ed.zip | |
Use pluralize in one instance
| -rw-r--r-- | compiler/rustc_expand/src/mbe/macro_parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/mbe/macro_parser.rs b/compiler/rustc_expand/src/mbe/macro_parser.rs index 29f354d5728..ddfbef945ef 100644 --- a/compiler/rustc_expand/src/mbe/macro_parser.rs +++ b/compiler/rustc_expand/src/mbe/macro_parser.rs @@ -76,6 +76,7 @@ crate use ParseResult::*; use crate::mbe::{KleeneOp, TokenTree}; use rustc_ast::token::{self, DocComment, Nonterminal, NonterminalKind, Token}; +use rustc_lint_defs::pluralize; use rustc_parse::parser::{NtOrTt, Parser}; use rustc_span::symbol::MacroRulesNormalizedIdent; use rustc_span::Span; @@ -668,8 +669,7 @@ impl TtParser { self.macro_name, match self.next_mps.len() { 0 => format!("built-in NTs {}.", nts), - 1 => format!("built-in NTs {} or 1 other option.", nts), - n => format!("built-in NTs {} or {} other options.", nts, n), + n => format!("built-in NTs {} or {n} other option{s}.", nts, s = pluralize!(n)), } ), ) |
