while let
suggestion missing when E0308 happens in closure body
#113354
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.
Code
Current output
Desired output
Rationale and extra context
When an assignment is used as the test in a
while
statement, the compiler will add ahelp
message suggestingwhile let
instead. This message fails to appear when the erroneouswhile
statement is inside a closure body.Other cases
No response
Anything else?
This problem was discovered while investigating #113352 .
The text was updated successfully, but these errors were encountered: