Improving error for unnecessary parentheses in for
loop head
#62724
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The lexing & parsing of Rust source code to an AST
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
leads to this error:
(playground)
A colleague of mine typed this code, coming with a C++/JavaScript/Kotlin background where parentheses are required in the
for
loop head.I wonder if it’s possible/worth it to make that error message nicer and easier to understand. (@estebank asked me to file this issue, so it doesn't get lost)
The text was updated successfully, but these errors were encountered: