rust/tests/ui/liveness/liveness-move-call-arg-2.rs
2023-07-14 07:12:35 +08:00

13 lines
190 B
Rust

fn take(_x: Box<isize>) {}
fn main() {
let _ = || {
let x: Box<isize> = Box::new(25);
loop {
take(x); //~ ERROR use of moved value: `x`
}
};
}