Rollup merge of #129065 - nnethercote:PartialEq-TokenKind, r=spastorino
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. r? `@spastorino`
This commit is contained in:
commit
bb63d75ac1
16 changed files with 122 additions and 129 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue