diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-04-20 14:08:59 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-04-20 14:08:59 +1000 |
| commit | f9235db37ea7253d5cd668b0155efad39530ffdb (patch) | |
| tree | 1bfdfea0162b1fa97d63cd39d211e8865e4baafe | |
| parent | 9e6879fdba34e5f5b2657b6666f00f6091b89545 (diff) | |
| download | rust-f9235db37ea7253d5cd668b0155efad39530ffdb.tar.gz rust-f9235db37ea7253d5cd668b0155efad39530ffdb.zip | |
Inline `Parser::parse_nonterminal`.
| -rw-r--r-- | compiler/rustc_parse/src/parser/nonterminal.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ impl<'a> Parser<'a> { } } - /// 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. |
