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

E0425 needs to be updated to new format #35343

Closed
sophiajt opened this issue Aug 4, 2016 · 4 comments
Closed

E0425 needs to be updated to new format #35343

sophiajt opened this issue Aug 4, 2016 · 4 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 4, 2016

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

Error E0425 needs a span_label, updating it from:

error[E0425]: unresolved name `SomeTrait`
  --> src/test/compile-fail/E0033.rs:16:33
   |
16 |     let trait_obj: &SomeTrait = SomeTrait; //~ ERROR E0425
   |                                 ^^^^^^^^^
   |
   = help: trait `SomeTrait` cannot be used as an expression

To:

error[E0425]: unresolved name `SomeTrait`
  --> src/test/compile-fail/E0033.rs:16:33
   |
16 |     let trait_obj: &SomeTrait = SomeTrait; //~ ERROR E0425
   |                                 ^^^^^^^^^ unresolved name
   |
   = help: trait `SomeTrait` cannot be used as an expression

Note, this assumes we can know this information when we're making the label.

Edit: I've updated the default label above

@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. labels Aug 4, 2016
@sophiajt
Copy link
Contributor Author

A note to who is doing this one, it seems E0425 is used for a few styles of errors. For example:

error[E0425]: unresolved name `varaible`. Did you mean `variable`?
 --> quicktest.rs:3:11
  |
3 |   let x = varaible;
  |           ^^^^^^^^

The "Did you mean variable?" part should be a label, if it exists. Which turns the above into:

error[E0425]: unresolved name `varaible`.
 --> quicktest.rs:3:11
  |
3 |   let x = varaible;
  |           ^^^^^^^^ did you mean `variable`?

@sophiajt
Copy link
Contributor Author

One more note. I've updated the default label. Basically, we'll have a default label if there is no "did you mean..." part, otherwise if there is a "did you mean..." we'll use that as the label.

@sophiajt
Copy link
Contributor Author

For @prabodhtiwari (who I think volunteered for this one). I made a couple changes. If you have any questions, just tag me and ask.

@bstrie
Copy link
Contributor

bstrie commented Sep 25, 2016

Freeing this one up as part of the final push for #35233.

bors added a commit that referenced this issue Sep 27, 2016
Update E0425, E0446, E0449

This addresses #35343, #35923, and #35924.  Part of #35233

Specifically, this adds labels to these error messages following the suggestions in the attached bugs.

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

2 participants