Closed
Description
Given the following code : link
let X: i32 = 12;
fn main() {
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected item, found keyword `let`
--> src/main.rs:1:1
|
1 | let X: i32 = 12;
| ^^^ expected item
error: could not compile `playground` due to previous error
Ideally the output should inform the user that let
cannot be used to create global variables and suggest using const
instead. (Might need a little rephrasing).