Skip to content

Rename self param will no generic params #17366

@A4-Tacks

Description

@A4-Tacks

rust-analyzer version: rust-analyzer 1.77.0-nightly (bf8716f1 2023-12-24)

rustc version: rustc 1.77.0-nightly (bf8716f1c 2023-12-24)

editor or extension: Vim 9.1

code snippet to reproduce:

struct X<T>(T);
impl<T> X<T> {
    fn foo(&self) {}
}

expect output

struct X<T>(T);
impl<T> X<T> {
    fn foo(this: &Self) {}
}

failed output

struct X<T>(T);
impl<T> X<T> {
    fn foo(this: &X) {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions