Simple example of code only for illustrative purpose:
struct A {
fieldOne: String;
}
fn main() {
let x = A { fieldOne = String::from_str("testtest") };
let y = x; // a move performed
}
Is the x object destroyed (dropped) immediately after the move or it will be dropped only after going out of scope?