-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
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: link
trait Trait {
let x: i32;
}
fn main() {
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: non-item in item list
--> src/main.rs:2:5
|
1 | trait Trait {
| - item list starts here
2 | let x: i32;
| ^^^ non-item starts here
3 | }
| - item list ends here
error: could not compile `playground` due to previous error
Ideally the output should suggest changing the let
to a const
for associated const. Thanks.
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.