In Rust, what’s the difference between “shadowing” and “mutability”?
I believe the confusion is because you’re conflating names with storage. fn main() { let x = 5; // x_0 println!(“The value of x is {}”, x); let x = 6; // x_1 println!(“The value of x is {}”, x); } In this example, there is one name (x), and two storage locations (x_0 and … Read more