let-chains parsing is not resilient to stray ;
between let
s
#117720
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
F-let_chains
`#![feature(let_chains)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
This is a common typo I make when hoisting an inconditional let binding into the let chain to merge two let-chains that could be one. The parser only needs to do look-ahead 1 and 2 to detect the case and recover.
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: