1
Fork 0

Use impl PartialEq<TokenKind> for Token more.

This lets us compare a `Token` with a `TokenKind`. It's used a lot, but
can be used even more, avoiding the need for some `.kind` uses.
This commit is contained in:
Nicholas Nethercote 2024-08-09 17:44:47 +10:00
parent bbcfd90cd1
commit 7923b20dd9
16 changed files with 121 additions and 128 deletions

View file

@ -1853,7 +1853,7 @@ impl KeywordIdents {
if !prev_dollar {
self.check_ident_token(cx, UnderMacro(true), ident);
}
} else if token.kind == TokenKind::Dollar {
} else if *token == TokenKind::Dollar {
prev_dollar = true;
continue;
}