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:
commit
92aba63d6b
5 changed files with 51 additions and 10 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue