Skip to content

E0425 needs to be updated to new format #35343

Closed

Description

@sophiajt

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

Activity

  1. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    A-diagnosticsArea: Messages for errors, warnings, and lints
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    on Aug 4, 2016
  2. sophiajt commented on Aug 11, 2016

    @sophiajt
    ContributorAuthor

    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`?
    
  3. sophiajt commented on Aug 11, 2016

    @sophiajt
    ContributorAuthor

    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.

  4. sophiajt commented on Aug 11, 2016

    @sophiajt
    ContributorAuthor

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

  5. bstrie commented on Sep 25, 2016

    @bstrie
    Contributor

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

  6. added a commit that references this issue on Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions