diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-11-14 00:46:37 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-11-14 00:46:37 +0000 |
| commit | f830fe313ba8b23fe882589ba8dcbbd5739137e8 (patch) | |
| tree | 09f6d1be033df9054ef2678b07939cf429845be0 /compiler/rustc_ast/src | |
| parent | 85b84504669c6c779fab7b96fbe5b26635067cd1 (diff) | |
| download | rust-f830fe313ba8b23fe882589ba8dcbbd5739137e8.tar.gz rust-f830fe313ba8b23fe882589ba8dcbbd5739137e8.zip | |
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, } } |
