Closed
Description
Given the following code:
fn main() {
const b: = 123;
}
The current output is:
Compiling playground v0.0.1 (/playground)
error: expected type, found `=`
--> src/main.rs:2:14
|
2 | const b: = 123;
| ^ expected type
error: could not compile `playground` due to previous error
Since the compiler suggests the type needed for the following:
fn main() {
const b = 123;
}
Compiling playground v0.0.1 (/playground)
error: missing type for `const` item
--> src/main.rs:2:11
|
2 | const b = 123;
| ^ help: provide a type for the constant: `b: i32`
error: could not compile `playground` due to previous error
The output ideally should also suggest the type if its left dangling.