diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-15 19:32:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-15 19:32:35 +0200 |
| commit | bb63d75ac1477eb361bfee764709f5d54e08cec8 (patch) | |
| tree | 4d22981027b1eaabd56035ab21627248c65e2624 /compiler/rustc_lint | |
| parent | 3075644a3db0e529e5e9e74cf5ea74a0a638d1fe (diff) | |
| parent | 7923b20dd9587743372b3fdf7b48eae220200f6e (diff) | |
| download | rust-bb63d75ac1477eb361bfee764709f5d54e08cec8.tar.gz rust-bb63d75ac1477eb361bfee764709f5d54e08cec8.zip | |
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`
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 6b36944b208..5f6e7fb314d 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -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; } |
