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

Missing error message #33262

Closed
tbtlr opened this issue Apr 28, 2016 · 0 comments · Fixed by #33311
Closed

Missing error message #33262

tbtlr opened this issue Apr 28, 2016 · 0 comments · Fixed by #33311
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@tbtlr
Copy link

tbtlr commented Apr 28, 2016

After some refactoring of quite a large code base I accidentally ended up with code similar to this:

for i in 0..a as {
  ...
}

Which fails with an error at compile time, but no error message nor line indication whatsoever.

Steps to reproduce: https://play.rust-lang.org/?gist=292a681d9c575bf728805b0c24e4e25a&version=stable&backtrace=0

@nagisa nagisa added A-diagnostics Area: Messages for errors, warnings, and lints A-amusing labels Apr 28, 2016
birkenfeld added a commit to birkenfeld/rust that referenced this issue May 1, 2016
Invalid expressions on the RHS were just swallowed without generating
an error.  The new code more closely mirrors the code for parsing
`..x` in the `parse_prefix_range_expr` method, where no cancel is done
either.

Fixes rust-lang#33262.
bors added a commit that referenced this issue May 7, 2016
parser: fix suppression of syntax errors in range RHS

Invalid expressions on the RHS were just swallowed without generating an error.  The new version more closely mirrors the code for parsing `..x` in the `parse_prefix_range_expr` method below, where no cancel is done either.

Fixes #33262.
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

Successfully merging a pull request may close this issue.

2 participants