-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following code:
fn main() {
mut let x = 123;
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected expression, found keyword `mut`
--> src/main.rs:2:5
|
2 | mut let x = 123;
| ^^^ expected expression
error: could not compile `playground` due to previous error
Ideally the output should suggest to move the mut
to behind the let
, since the current error message does not identify the problem accurately.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.