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

Add ide-assist: generate_impl_trait for generate_impl

Open A4-Tacks opened this issue 7 months ago • 1 comments

Adds this trait impl for a type.

trait $0Foo {
    fn foo(&self) -> i32;
}

->

trait Foo {
    fn foo(&self) -> i32;
}

impl Foo for ${1:_} {
    $0fn foo(&self) -> i32 {
        todo!()
    }
}

A4-Tacks avatar Jun 06 '25 08:06 A4-Tacks

r? @Veykril

A4-Tacks avatar Jun 13 '25 23:06 A4-Tacks

Besides tabstop, other things look good

ShoyuVanilla avatar Jun 27 '25 09:06 ShoyuVanilla