Skip to content

poor error message when colon is used instead of semicolon #39126

New issue

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

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

Already on GitHub? # to your account

Closed
tshepang opened this issue Jan 17, 2017 · 2 comments
Closed

poor error message when colon is used instead of semicolon #39126

tshepang opened this issue Jan 17, 2017 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tshepang
Copy link
Member

I get this error:

error: expected type, found keyword `let`
 --> src/main.rs:3:5
  |
3 |     let two_squared = two * two;
  |     ^^^

That's with this code:

fn main() {
    let two = 2:
    let two_squared = two * two;
}
@sfackler sfackler added the A-diagnostics Area: Messages for errors, warnings, and lints label Jan 17, 2017
@brson
Copy link
Contributor

brson commented Jan 18, 2017

Is this because of the type ascription parser? I recall there was another issue about making the stable parser not parse unstable things.

@brson brson added A-parser Area: The parsing of Rust source code to an AST C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jan 18, 2017
@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
Copy link
Member

Closing in favor of #34255.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

5 participants