You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
For global variable declaration, suggest const if let is used instead #100394
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).
Activity
chenyukang commentedon Aug 11, 2022
@rustbot claim
Rollup merge of rust-lang#100396 - chenyukang:fix-100394, r=petrochenkov
Rollup merge of rust-lang#100396 - chenyukang:fix-100394, r=petrochenkov
Rollup merge of rust-lang#100396 - chenyukang:fix-100394, r=petrochenkov
Rageking8 commentedon Aug 13, 2022
Completed by #100396