From f9235db37ea7253d5cd668b0155efad39530ffdb Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 20 Apr 2022 14:08:59 +1000 Subject: [PATCH] Inline `Parser::parse_nonterminal`. --- compiler/rustc_parse/src/parser/nonterminal.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_parse/src/parser/nonterminal.rs b/compiler/rustc_parse/src/parser/nonterminal.rs index b45bca3d2e0..c5caa3ea636 100644 --- a/compiler/rustc_parse/src/parser/nonterminal.rs +++ b/compiler/rustc_parse/src/parser/nonterminal.rs @@ -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.