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

E0004 needs to be updated to new format #35191

Closed
sophiajt opened this issue Aug 2, 2016 · 6 comments
Closed

E0004 needs to be updated to new format #35191

sophiajt opened this issue Aug 2, 2016 · 6 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 2, 2016

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

E0004 needs a span_label, taking it from:

error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered
  --> src/test/compile-fail/E0004.rs:19:5
   |
19 |     match x { //~ ERROR E0004
   |     ^

to:

error[E0004]: non-exhaustive patterns: `HastaLaVistaBaby` not covered
  --> src/test/compile-fail/E0004.rs:19:5
   |
19 |     match x { //~ ERROR E0004
   |     ^ pattern `HastaLaVistaBaby` not covered

Bonus: We may want to update the span that this error uses as well to point at something other than the beginning of the match.

@sophiajt sophiajt added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. and removed E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 2, 2016
@TheZoq2
Copy link
Contributor

TheZoq2 commented Aug 3, 2016

I'll give this one a shot

@TheZoq2
Copy link
Contributor

TheZoq2 commented Aug 5, 2016

I wouldn't mind working on the bonus part of this issue too but i'm not sure what to change the span to. To me, it might make more sense to change it to

match x {
^^^^^^^

or

match x {
^^^^^

@sophiajt
Copy link
Contributor Author

sophiajt commented Aug 5, 2016

Yeah, I like:

match x {
^^^^^^^ pattern `HastaLaVistaBaby` not covered

@TheZoq2
Copy link
Contributor

TheZoq2 commented Aug 5, 2016

Alright, i'll try implementing that

sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 5, 2016
eddyb added a commit to eddyb/rust that referenced this issue Aug 6, 2016
@KiChjang
Copy link
Member

KiChjang commented Aug 8, 2016

@TheZoq2 Did you manage to include the bonus in your PR (#35380)? If not, I can take over.

@TheZoq2
Copy link
Contributor

TheZoq2 commented Aug 8, 2016

I did not, and it looks like you already submitted a pull request for it?

bors added a commit that referenced this issue Aug 8, 2016
Lengthen the span label to include match and expr for E0004

Part of #35233.
Extension of #35191.

r? @GuillaumeGomez
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 E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

3 participants