rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Rename self param will no generic params

Open A4-Tacks opened this issue 1 year ago • 0 comments

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) {}
}

A4-Tacks avatar Jun 08 '24 02:06 A4-Tacks