rust/src/test/run-pass/bind-by-move.rs

14 lines
238 B
Rust
Raw Normal View History

// xfail-test
extern mod std;
2012-09-05 14:32:05 -05:00
use std::arc;
fn dispose(+_x: arc::ARC<bool>) unsafe { }
fn main() {
let p = arc::arc(true);
let x = some(p);
match move x {
some(move z) => { dispose(z); },
none => fail
}
}