Closed
Description
The following code does not guide the user towards the problem. Especially considering the fact that there's no type ascription feature gate active.
fn main() {
let u: usize = std::mem:size_of::<u32>();
// ^ note the single colon instead of double
}
Errors:
Compiling playground v0.0.1 (/playground)
warning: unnecessary path disambiguator
--> src/main.rs:2:36
|
2 | let u: usize = std::mem:size_of::<u32>();
| ^^ try removing `::`
error: expected one of `!`, `::`, or `;`, found `(`
--> src/main.rs:2:43
|
2 | let u: usize = std::mem:size_of::<u32>();
| ^ expected one of `!`, `::`, or `;` here
error: aborting due to previous error
error: Could not compile `playground`.
To learn more, run the command again with --verbose.