Skip to content

Incorrect error count when using the unsupported unary plus #36499

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

Closed
0xmohit opened this issue Sep 15, 2016 · 1 comment
Closed

Incorrect error count when using the unsupported unary plus #36499

0xmohit opened this issue Sep 15, 2016 · 1 comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@0xmohit
Copy link
Contributor

0xmohit commented Sep 15, 2016

Executing the following:

fn main() {
  2 + +2;
}

results in:

foo.rs:2:7: 2:8 error: expected expression, found `+`
foo.rs:2   2 + +2;
               ^
error: aborting due to 2 previous errors

The reference makes it clear that the above code would be rejected. However, the error count indicated doesn't appear to be correct.

@sfackler sfackler added the A-diagnostics Area: Messages for errors, warnings, and lints label Sep 15, 2016
@TimNN
Copy link
Contributor

TimNN commented Sep 15, 2016

Introduced between nightly-2016-04-22 and nightly-2016-04-25 (Changes)

I'm pretty sure I found the problem and should have a fix ready soon.

bors added a commit that referenced this issue Sep 18, 2016
correctly cancel some errors

Fixes #36499.

I also (proactively) changed all other calls in `parser.rs` to use `Handler::cancel`.
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
Projects
None yet
Development

No branches or pull requests

3 participants