Skip to content

Commit d2b9bbb

Browse files
committed
Inline Parser::nonterminal_may_begin_with.
1 parent f9235db commit d2b9bbb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_parse/src/parser/nonterminal.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ use crate::parser::{FollowedByType, ForceCollect, NtOrTt, Parser, PathStyle};
1111
impl<'a> Parser<'a> {
1212
/// Checks whether a non-terminal may begin with a particular token.
1313
///
14-
/// Returning `false` is a *stability guarantee* that such a matcher will *never* begin with that
15-
/// token. Be conservative (return true) if not sure.
14+
/// Returning `false` is a *stability guarantee* that such a matcher will *never* begin with
15+
/// that token. Be conservative (return true) if not sure. Inlined because it has a single call
16+
/// site.
17+
#[inline]
1618
pub fn nonterminal_may_begin_with(kind: NonterminalKind, token: &Token) -> bool {
1719
/// Checks whether the non-terminal may contain a single (non-keyword) identifier.
1820
fn may_be_ident(nt: &token::Nonterminal) -> bool {

0 commit comments

Comments
 (0)