Closed
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.