rust/src/test/run-pass/intrinsic-move-val.rs
2012-06-14 13:49:41 -07:00

12 lines
229 B
Rust

#[abi = "rust-intrinsic"]
native mod rusti {
fn move_val_init<T>(&dst: T, -src: T);
fn move_val<T>(&dst: T, -src: T);
}
fn main() {
let mut x = @1;
let mut y = @2;
rusti::move_val(y, x);
assert *y == 1;
}