Misleading Error message when missing the let
keyword
#37509
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If you write
x : i32 = 0;
instead of
let x : i32 = 0;
The error message ''type ascription is experimental" pops up.
I know little about type ascription, but I don't see any reason to use type ascription on an unresolved name (in this case
x
).Something like "Did you mean
let x : i32 = 0;
would be preferable".I think you should know this issue, but I did not find any duplicates.
Meta:
`rustc --version --verbose`The text was updated successfully, but these errors were encountered: