Closed
Description
This code:
fn main() {
let a = 3
}
gives the error:
error: expected one of `.`, `;`, `?`, or an operator, found `}`
--> src/main.rs:3:1
|
2 | let a = 3
| - expected one of `.`, `;`, `?`, or an operator here
3 | }
| ^ unexpected token
It would be nice if this would instead say that let
is not an expression.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: The lexing & parsing of Rust source code to an ASTCategory: An issue proposing an enhancement or a PR with one.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.Working group: Diagnostics