我测试下面的代码:
fn main() {
let tested = Some(5);
testoption(tested);
println!("the tested is {}", tested.unwrap());
}
fn testoption(p: Option<i32>) {
println!("the argument is {}", p.unwrap());
}
调用函数后可以使用测试的变量.我认为它应该搬走.
那么,什么样的变量在函数调用后不会被移动呢?实现复制特征还是其他什么?