1
Fork 0

Rollup merge of #117892 - estebank:fat-arrow-typo, r=compiler-errors

Detect more `=>` typos

Handle and recover `match expr { pat >= { arm } }`.
This commit is contained in:
Matthias Krüger 2023-11-17 00:41:22 +01:00 committed by GitHub
commit 92aba63d6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 10 deletions

View file

@ -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,
}
}