2012-06-14 13:11:31 -05:00
|
|
|
#[abi = "rust-intrinsic"]
|
2012-07-03 18:11:00 -05:00
|
|
|
extern mod rusti {
|
2012-09-21 20:10:45 -05:00
|
|
|
#[legacy_exports];
|
2012-10-05 16:58:42 -05:00
|
|
|
fn move_val_init<T>(dst: &mut T, -src: T);
|
|
|
|
fn move_val<T>(dst: &mut T, -src: T);
|
2012-06-14 13:11:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut x = @1;
|
|
|
|
let mut y = @2;
|
2012-09-19 00:45:24 -05:00
|
|
|
rusti::move_val(&mut y, move x);
|
2012-06-14 13:11:31 -05:00
|
|
|
assert *y == 1;
|
|
|
|
}
|