Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading Error message when missing the let keyword #37509

Closed
memoryleak47 opened this issue Nov 1, 2016 · 1 comment
Closed

Misleading Error message when missing the let keyword #37509

memoryleak47 opened this issue Nov 1, 2016 · 1 comment
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.

Comments

@memoryleak47
Copy link
Contributor

memoryleak47 commented Nov 1, 2016

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`
rustc 1.12.1 (d4f39402a 2016-10-19)
binary: rustc
commit-hash: d4f39402a0c2c2b94ec0375cd7f7f6d7918113cd
commit-date: 2016-10-19
host: x86_64-unknown-linux-gnu
release: 1.12.1
@TimNN TimNN added the A-diagnostics Area: Messages for errors, warnings, and lints label Nov 1, 2016
@steveklabnik steveklabnik added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2017
@Mark-Simulacrum Mark-Simulacrum added the A-parser Area: The parsing of Rust source code to an AST. label May 30, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of #34255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants