When renaming a struct field, one often has to go clean up any constructors manually by also renaming the variable there. It would be nice if this was automated.
Example:
struct Struct {
// renamed from struct_field
field: String,
}
impl Struct {
// this parameter should have been renamed too
fn new(struct_field: String) -> Self {
// so that struct init shorthand is used here
Self { field: struct_field }
}
}
Related: #6547
When renaming a struct field, one often has to go clean up any constructors manually by also renaming the variable there. It would be nice if this was automated.
Example:
Related: #6547