Skip to content

Commit

Permalink
Use pluralize in one instance
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed May 13, 2022
1 parent cc3c5d2 commit e6ccf9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_expand/src/mbe/macro_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)),
}
),
)
Expand Down

0 comments on commit e6ccf9b

Please sign in to comment.