rust/tests/ui/liveness/liveness-move-call-arg.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
151 B
Rust
Raw Normal View History

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