Simplify a match
.
`may_be_ident` is true for `NtPath` and `NtMeta`, so we don't need to check for them separately.
This commit is contained in:
parent
9a3c907bdb
commit
e46caaf84b
@ -64,10 +64,7 @@ impl<'a> Parser<'a> {
|
||||
},
|
||||
NonterminalKind::Path | NonterminalKind::Meta => match &token.kind {
|
||||
token::ModSep | token::Ident(..) => true,
|
||||
token::Interpolated(nt) => match **nt {
|
||||
NtPath(_) | NtMeta(_) => true,
|
||||
_ => may_be_ident(&nt),
|
||||
},
|
||||
token::Interpolated(nt) => may_be_ident(nt),
|
||||
_ => false,
|
||||
},
|
||||
NonterminalKind::PatParam { .. } | NonterminalKind::PatWithOr => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user