Skip to content

E0325 needs to be updated to new format #35329

Closed
@sophiajt

Description

@sophiajt

From: src/test/compile-fail/impl-wrong-item-for-trait.rs

Error E0324 needs a span_label, updated title, and a note, updating it from:

error[E0325]: item `bar` is an associated type, which doesn't match its trait `<FooTypeForMethod as Foo>`
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:40:5
   |
40 |     type bar = u64;
   |     ^^^^^^^^^^^^^^^

To:

error[E0325]: item `bar` is an associated type, which doesn't match its trait 
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:40:5
   |
40 |     type bar = u64;
   |     ^^^^^^^^^^^^^^^ does not match trait
   |
   = note: matching trait `<FooTypeForMethod as Foo>`

Bonus: show the original part of the trait that conflicts

error[E0325]: item `bar` is an associated type, which doesn't match its trait 
  --> src/test/compile-fail/impl-wrong-item-for-trait.rs:40:5
   |
14 |    fn bar(&self);
   |    -------------- original trait requirement
...
40 |     type bar = u64;
   |     ^^^^^^^^^^^^^^^ does not match trait
   |
   = note: matching trait `<FooTypeForMethod as Foo>`

Note: likely related to #35327 and #35325

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