use matches! macro in more places
This commit is contained in:
@@ -20,12 +20,10 @@ impl<'a> Parser<'a> {
|
||||
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 {
|
||||
match *nt {
|
||||
token::NtItem(_) | token::NtBlock(_) | token::NtVis(_) | token::NtLifetime(_) => {
|
||||
false
|
||||
}
|
||||
_ => true,
|
||||
}
|
||||
!matches!(
|
||||
*nt,
|
||||
token::NtItem(_) | token::NtBlock(_) | token::NtVis(_) | token::NtLifetime(_)
|
||||
)
|
||||
}
|
||||
|
||||
match kind {
|
||||
|
||||
Reference in New Issue
Block a user