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

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

13 lines
190 B
Rust
Raw Normal View History

2023-07-11 14:22:22 +00:00
fn take(_x: Box<isize>) {}
fn main() {
let _ = || {
let x: Box<isize> = Box::new(25);
loop {
take(x); //~ ERROR use of moved value: `x`
}
};
}