rust/tests/ui/liveness/liveness-move-call-arg.rs
2023-01-11 09:32:08 +00:00

12 lines
151 B
Rust

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