Using while if let
triggers an error about mismatched curly brackets
#92705
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When refactoring, I accidentally tried to create an
while if let
expression. This caused the parser to give me an error about mismatched brackets. This made it difficult to fix the underlying bug.Given the following code:
The current output is:
Ideally, the output should indicate that either the
if
orwhile
should be deleted.p.s. it turns out that the
let
is not actually necessary to trigger the same error message:The text was updated successfully, but these errors were encountered: