Skip to content

E0186 needs to be updated to new format #35277

@sophiajt

Description

@sophiajt

From: src/test/compile-fail/E0186.rs

Error E0186 needs a span_label, updating it from:

error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
  --> src/test/compile-fail/E0186.rs:18:5
   |
18 |     fn foo() {} //~ ERROR E0186
   |     ^^^^^^^^^^^

To:

error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
  --> src/test/compile-fail/E0186.rs:18:5
   |
18 |     fn foo() {} //~ ERROR E0186
   |     ^^^^^^^^^^^ expected `&self` in impl

Bonus: show the trait line as well

error[E0186]: method `foo` has a `&self` declaration in the trait, but not in the impl
  --> src/test/compile-fail/E0186.rs:18:5
   |
12 |     fn foo(&self);
   |     -------------- `&self` used in trait
...
18 |     fn foo() {} //~ ERROR E0186
   |     ^^^^^^^^^^^ expected `&self` in impl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions