Rust Move vs Copy

I've been looking at the Rust Ownership model . The skinny is that Rust has made mostly opposite decisions from C++. Copy vs Move An assignment in Rust is by default, a move. The original variable is declared as invalid and using it will net you a hard error at compile time. The example used in the docs is: let s1 = String::from("hello"); let s2 = s1; println!("{}, world!", s1); That last line will not compile because s1 is no longer valid.

Read more »