- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
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/impl-wrong-item-for-trait.rs
Error E0323 needs a span_label, updated title, and a note, updating it from:
error[E0323]: item `bar` is an associated const, which doesn't match its trait `<FooConstForMethod as Foo>`
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:22:5
   |
22 |     const bar: u64 = 1;
   |     ^^^^^^^^^^^^^^^^^^^
To:
error[E0323]: item `bar` is an associated const, which doesn't match its trait
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:22:5
   |
22 |     const bar: u64 = 1;
   |     ^^^^^^^^^^^^^^^^^^^ does not match trait
   |
   = note: matching trait `<FooConstForMethod as Foo>`
Bonus: show the original part of the trait that conflicts:
error[E0323]: item `bar` is an associated const, which doesn't match its trait
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:22:5
   |
14 |    fn bar(&self);
   |    -------------- original trait requirement
...
22 |     const bar: u64 = 1;
   |     ^^^^^^^^^^^^^^^^^^^ does not match trait
   |
   = note: matching trait `<FooConstForMethod as Foo>`
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.