Skip to content

E0195 needs to be updated to new format #35511

Closed
@sophiajt

Description

@sophiajt

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

Error E0195 needs a span_label, updating it from:

error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration
  --> src/test/compile-fail/E0195.rs:18:5
   |
18 |     fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
   |     ^

To:

error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration
  --> src/test/compile-fail/E0195.rs:18:5
   |
18 |     fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
   |     ^ lifetimes do not match trait

Bonus: Underline the lifetimes and show the original trait requirement:

error[E0195]: lifetime parameters or bounds on method `bar` do not match the trait declaration
  --> src/test/compile-fail/E0195.rs:18:5
   |
13 |     fn bar<'a,'b:'a>(x: &'a str, y: &'b str);
   |           ---------- original trait requirement
...
18 |     fn bar<'a,'b>(x: &'a str, y: &'b str) { //~ ERROR E0195
   |           ^^^^^^^ lifetimes do not match trait

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions