diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-17 00:41:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-17 00:41:22 +0100 |
| commit | 92aba63d6b46dbcf50b544c6cef8b85d8713aa09 (patch) | |
| tree | e2f3283684fe23e4431ec20c5e6fd416a711638b /compiler/rustc_ast/src | |
| parent | a57770440f1ebe5b992551d3bcc489ae211908d4 (diff) | |
| parent | f830fe313ba8b23fe882589ba8dcbbd5739137e8 (diff) | |
| download | rust-92aba63d6b46dbcf50b544c6cef8b85d8713aa09.tar.gz rust-92aba63d6b46dbcf50b544c6cef8b85d8713aa09.zip | |
Rollup merge of #117892 - estebank:fat-arrow-typo, r=compiler-errors
Detect more `=>` typos
Handle and recover `match expr { pat >= { arm } }`.
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/token.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index a6ee93e8a6b..707238e6c02 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -388,7 +388,8 @@ impl TokenKind { match *self { Comma => Some(vec![Dot, Lt, Semi]), Semi => Some(vec![Colon, Comma]), - FatArrow => Some(vec![Eq, RArrow]), + Colon => Some(vec![Semi]), + FatArrow => Some(vec![Eq, RArrow, Ge, Gt]), _ => None, } } |
