-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
struct Foo {
$0name: String,
id: u32$0,
counter: u32,
}
impl Foo {
fn clear(&mut self) {
self.name.clear();
self.id = 0;
}
fn init_id(&mut self) {
self.id = self.counter;
self.counter += 1;
}
}
->
struct NewStruct {
name: String,
id: u32
}
impl NewStruct {
fn clear(&mut self) {
self.name.clear();
self.id = 0;
}
}
struct Foo {
new_struct$0: NewStruct,
counter: u32,
}
impl Foo {
fn init_id(&mut self) {
self.new_struct.id = self.counter;
self.counter += 1;
}
}
@rustbot label +A-assists