Skip to content

"implement missing members" assist uses incorrect lifetime name #13363

@joseph-gio

Description

@joseph-gio

rust-analyzer version: rust-analyzer version: 0.3.1229-standalone (5c28ad193 2022-10-01)

rustc version: rustc 1.63.0 (4b91a6ea7 2022-08-08)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME)

Given the following code:

pub trait MyTrait<'lifetime> {
    fn foo(&'lifetime self);
}

impl<'a> MyTrait<'a> for () {

}

Using the assist "implement missing members" results in the following:

impl<'a> MyTrait<'a> {
    fn foo(&'lifetime self) { // this should be &'a self
        todo!()
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistsC-bugCategory: bugS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions