I'm new to Rust and I'm currently reading The Rust Programming Language book.
I'm curious about this example:
fn main() {
let s1 = String::from("Hello, ");
let s2 = String::from("world!");
let s3 = s1 + &s2; // note s1 has been moved here and can no longer be used
}
Is it possible to take ownership not only of s1, but also of s2, so s2 gets invalidated as well as s1, making s3 the only possible variable that remains usable?