1/6

Assignment does one of two things, and the type decides which.

If the type implements Copy, the bits are duplicated and both bindings stay usable. If it does not, ownership moves and the source binding is dead — using it afterwards is a compile error, not a runtime surprise.

let x = 10;
let y = x;
println!("{x}");        // fine — i32 is Copy

let s1 = String::from("hi");
let s2 = s1;
println!("{s1}");       // error: borrow of moved value: `s1`