-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
C-featureCategory: feature requestCategory: feature request
Description
Add a Code Action, Generate blanket trait implementation on trait define
- Generate
Thisgeneric param - Generate
Selfbounds toThis - Generate where-clause bounds
- Generate required methods, use
todo!()fill
trait Foo: ToOwned
where
Self::Owned: Default,
{
fn foo(&self) -> i32;
fn print_foo(&self) {
println!("{}", self.foo());
}
}On trait Foo use Generate blanket trait implementation:
trait Foo: ToOwned
where
Self::Owned: Default,
{
fn foo(&self) -> i32;
fn print_foo(&self) {
println!("{}", self.foo());
}
}
impl<This: ToOwned> Foo for This
where
This::Owned: Default,
{
fn foo(&self) -> i32 {
todo!()
}
}Metadata
Metadata
Assignees
Labels
C-featureCategory: feature requestCategory: feature request