Skip to content

Corrupted error message when missing comma in match on nightly #41224

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
Osspial opened this issue Apr 11, 2017 · 4 comments
Closed

Corrupted error message when missing comma in match on nightly #41224

Osspial opened this issue Apr 11, 2017 · 4 comments

Comments

@Osspial
Copy link

Osspial commented Apr 11, 2017

When attempting to compile this code on the latest nightly, I get the given error message:

fn main() {
    match 3 {
        2 => ()
        _ => ()
    }
}
error: expected one of `,`, `.`, `?`, `}`, or an operator, found `_`
 --> src/main.rs:4:9
  |
3 |           2 => ()
  |  ________________- starting here...
4 | |         _ => ()
  | |  ...endi^gunexpected tokenone of `,`, `.`, `?`, `}`, or an operator here

error: aborting due to previous error

I should be getting an error message on that, but the formatting is being pretty severely garbled. For reference, this is the message I get on stable/beta:

error: expected one of `,`, `.`, `?`, `}`, or an operator, found `_`
 --> src/main.rs:4:9
  |
4 |         _ => ()
  |         ^

error: aborting due to previous error

rustc version:

> rustc --version --verbose
rustc 1.18.0-nightly (ad36c2f55 2017-04-09)
binary: rustc
commit-hash: ad36c2f5528d617db66c244d8bcbfc4b36da0ca0
commit-date: 2017-04-09
host: x86_64-pc-windows-gnu
release: 1.18.0-nightly
LLVM version: 3.9
@durka
Copy link
Contributor

durka commented Apr 11, 2017

Looks like #41155 which will be fixed in tomorrow's nightly. cc @estebank

@estebank
Copy link
Contributor

@durka indeed.

@estebank
Copy link
Contributor

estebank commented Jun 2, 2017

This can be closed.

@Mark-Simulacrum
Copy link
Member

Verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants