Inline Parser::parse_nonterminal.

This commit is contained in:
Nicholas Nethercote 2022-04-20 14:08:59 +10:00
parent 9e6879fdba
commit f9235db37e

View File

@ -95,7 +95,9 @@ fn may_be_ident(nt: &token::Nonterminal) -> bool {
}
}
/// Parse a non-terminal (e.g. MBE `:pat` or `:ident`).
/// Parse a non-terminal (e.g. MBE `:pat` or `:ident`). Inlined because there is only one call
/// site.
#[inline]
pub fn parse_nonterminal(&mut self, kind: NonterminalKind) -> PResult<'a, NtOrTt> {
// Any `Nonterminal` which stores its tokens (currently `NtItem` and `NtExpr`)
// needs to have them force-captured here.