Open
Description
Notice the capitalization (playground):
fn f() {
While let Some(x) = vec![].next() {
//
}
}
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found keyword `let`
--> src/lib.rs:2:11
|
2 | While let Some(x) = vec![].next() {
| ^^^ expected one of 8 possible tokens
Instead it would be nice to say
error: `While` is not a keyword
--> src/lib.rs:2:11
|
2 | While let Some(x) = vec![].next() {
| ^^^^^ help: try `while` instead
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: The lexing & parsing of Rust source code to an ASTArea: Suggestions generated by the compiler applied by `cargo fix`Diagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Relevant to the compiler team, which will review and decide on the PR/issue.