fn main() {
let mut a = 1;
let a = &mut a; // What's the property of this line?
*a = 2;
assert_eq!(*a, 2);
}
It doesn't seem like the normal variable shadowing where a new local variable is declared with the same name in a block.
It seems related to drop check, specifically the temporary lifetime extension.