struct Foo {
i: i32,
}
fn foo(foo: Foo) {
let Foo { i } = foo;
let _ = i<|>;
}
renaming i to bar here gives:
struct Foo {
i: i32,
}
fn foo(foo: Foo) {
let Foo { bar } = foo;
let _ = bar;
}
which is incorrect as Foo has no bar field. Instead it should be Foo { i: bar }.
renaming
itobarhere gives:which is incorrect as
Foohas nobarfield. Instead it should beFoo { i: bar }.