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

E0034 needs to be updated to new format #35205

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

E0034 needs to be updated to new format #35205

sophiajt opened this issue Aug 2, 2016 · 2 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/E0034.rs

The E0034 error message needs a span_label, changing it from:

error[E0034]: multiple applicable items in scope
  --> src/test/compile-fail/E0034.rs:25:5
   |
25 |     Test::foo() //~ ERROR E0034
   |     ^^^^^^^^^
   |
note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test`
  --> src/test/compile-fail/E0034.rs:21:24
   |
21 | impl Trait1 for Test { fn foo() {} }
   |                        ^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test`
  --> src/test/compile-fail/E0034.rs:22:24
   |
22 | impl Trait2 for Test { fn foo() {} }
   |                        ^^^^^^^^^^^

to:

error[E0034]: multiple applicable items in scope
  --> src/test/compile-fail/E0034.rs:25:5
   |
25 |     Test::foo() //~ ERROR E0034
   |     ^^^^^^^^^ multiple `foo` found
   |
note: candidate #1 is defined in an impl of the trait `Trait1` for the type `Test`
  --> src/test/compile-fail/E0034.rs:21:24
   |
21 | impl Trait1 for Test { fn foo() {} }
   |                        ^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Test`
  --> src/test/compile-fail/E0034.rs:22:24
   |
22 | impl Trait2 for Test { fn foo() {} }
   |                        ^^^^^^^^^^^

Bonus: there may be additional fixes we can do to improve E0034 as well. We could explore underlining the candidates as secondary notes rather than as completely separate notes as one possibility.

@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 2, 2016
@athulappadan
Copy link
Contributor

Let me work on this one.

@sophiajt
Copy link
Contributor Author

@athulappadan - I haven't heard anything on this from the first person who volunteered, so feel free to take it.

sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 30, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 30, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 31, 2016
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