Skip to content

Commit e6ccf9b

Browse files
committed
Use pluralize in one instance
1 parent cc3c5d2 commit e6ccf9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_expand/src/mbe/macro_parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ crate use ParseResult::*;
7676
use crate::mbe::{KleeneOp, TokenTree};
7777

7878
use rustc_ast::token::{self, DocComment, Nonterminal, NonterminalKind, Token};
79+
use rustc_lint_defs::pluralize;
7980
use rustc_parse::parser::{NtOrTt, Parser};
8081
use rustc_span::symbol::MacroRulesNormalizedIdent;
8182
use rustc_span::Span;
@@ -668,8 +669,7 @@ impl TtParser {
668669
self.macro_name,
669670
match self.next_mps.len() {
670671
0 => format!("built-in NTs {}.", nts),
671-
1 => format!("built-in NTs {} or 1 other option.", nts),
672-
n => format!("built-in NTs {} or {} other options.", nts, n),
672+
n => format!("built-in NTs {} or {n} other option{s}.", nts, s = pluralize!(n)),
673673
}
674674
),
675675
)

0 commit comments

Comments
 (0)