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

E0297 needs to be updated to new format #35521

Closed
sophiajt opened this issue Aug 8, 2016 · 0 comments
Closed

E0297 needs to be updated to new format #35521

sophiajt opened this issue Aug 8, 2016 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 8, 2016

From: src/test/compile-fail/E0297.rs

E0297 needs a span_label, updating it from:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^^^^^^^^^^

To:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^^^^^^^^^^ pattern `None` not covered

Bonus: narrow the span to focus on the "for <pattern>" piece:

error[E0297]: refutable pattern in `for` loop binding: `None` not covered
  --> src/test/compile-fail/E0297.rs:14:5
   |
14 |     for Some(x) in xs {} //~ ERROR E0297
   |     ^^^^^^^^^^^ pattern `None` not covered
@bstrie bstrie added the A-diagnostics Area: Messages for errors, warnings, and lints label Aug 24, 2016
bors added a commit that referenced this issue Sep 11, 2016
Update E0297 to new error format

Fixes #35521.
Part of #35233.

I didn't attempt the bonus of narrowing the span to focus on the "for `<pattern>`" piece (it's my first time contributing), but I'm happy to do so given some hints.

r? @jonathandturner
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Sep 13, 2016
Update E0297 to new error format

Fixes rust-lang#35521.
Part of rust-lang#35233.

I didn't attempt the bonus of narrowing the span to focus on the "for `<pattern>`" piece (it's my first time contributing), but I'm happy to do so given some hints.

r? @jonathandturner
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

2 participants