Fix some formatting.

This commit is contained in:
Nicholas Nethercote 2024-03-20 07:21:27 +11:00
parent 095722214d
commit c14d9ae23e

View File

@ -66,8 +66,7 @@ fn may_be_ident(nt: &token::Nonterminal) -> bool {
token::Interpolated(nt) => may_be_ident(&nt.0),
_ => false,
},
NonterminalKind::PatParam { .. } | NonterminalKind::PatWithOr => {
match &token.kind {
NonterminalKind::PatParam { .. } | NonterminalKind::PatWithOr => match &token.kind {
token::Ident(..) | // box, ref, mut, and other identifiers (can stricten)
token::OpenDelim(Delimiter::Parenthesis) | // tuple pattern
token::OpenDelim(Delimiter::Bracket) | // slice pattern
@ -84,8 +83,7 @@ fn may_be_ident(nt: &token::Nonterminal) -> bool {
token::BinOp(token::Or) => matches!(kind, NonterminalKind::PatWithOr),
token::Interpolated(nt) => may_be_ident(&nt.0),
_ => false,
}
}
},
NonterminalKind::Lifetime => match &token.kind {
token::Lifetime(_) => true,
token::Interpolated(nt) => {