2011-09-23 16:58:06 -05:00
|
|
|
fn test(-foo: ~[int]) { assert (foo[0] == 10); }
|
|
|
|
|
|
|
|
fn main() {
|
2012-06-25 22:00:46 -05:00
|
|
|
let x = ~[10]/~;
|
2011-09-23 16:58:06 -05:00
|
|
|
// Test forgetting a local by move-in
|
|
|
|
test(x);
|
|
|
|
|
|
|
|
// Test forgetting a temporary by move-in.
|
2012-06-25 22:00:46 -05:00
|
|
|
test(~[10]/~);
|
2011-09-23 16:58:06 -05:00
|
|
|
}
|