-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call 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.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call 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.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.