about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-04-20 14:13:49 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-04-20 14:13:49 +1000
commitd2b9bbbf783e2921fbca28eae06314e8b7f8a89a (patch)
treea1c2608a6efbec265789f8b9d52ae792e7e34da9 /compiler/rustc_parse/src/parser
parentf9235db37ea7253d5cd668b0155efad39530ffdb (diff)
downloadrust-d2b9bbbf783e2921fbca28eae06314e8b7f8a89a.tar.gz
rust-d2b9bbbf783e2921fbca28eae06314e8b7f8a89a.zip
Inline `Parser::nonterminal_may_begin_with`.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/nonterminal.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/nonterminal.rs b/compiler/rustc_parse/src/parser/nonterminal.rs
index c5caa3ea636..691bfdb01a4 100644
--- a/compiler/rustc_parse/src/parser/nonterminal.rs
+++ b/compiler/rustc_parse/src/parser/nonterminal.rs
@@ -11,8 +11,10 @@ use crate::parser::{FollowedByType, ForceCollect, NtOrTt, Parser, PathStyle};
 impl<'a> Parser<'a> {
     /// Checks whether a non-terminal may begin with a particular token.
     ///
-    /// Returning `false` is a *stability guarantee* that such a matcher will *never* begin with that
-    /// token. Be conservative (return true) if not sure.
+    /// Returning `false` is a *stability guarantee* that such a matcher will *never* begin with
+    /// that token. Be conservative (return true) if not sure. Inlined because it has a single call
+    /// site.
+    #[inline]
     pub fn nonterminal_may_begin_with(kind: NonterminalKind, token: &Token) -> bool {
         /// Checks whether the non-terminal may contain a single (non-keyword) identifier.
         fn may_be_ident(nt: &token::Nonterminal) -> bool {