2012-06-29 16:26:56 -07:00
|
|
|
fn test(-foo: @~[int]) { assert (foo[0] == 10); }
|
2011-08-09 17:56:26 -07:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-29 16:26:56 -07:00
|
|
|
let x = @~[10];
|
2011-08-09 17:56:26 -07:00
|
|
|
// Test forgetting a local by move-in
|
2012-09-18 22:45:24 -07:00
|
|
|
test(move x);
|
2011-08-09 17:56:26 -07:00
|
|
|
|
|
|
|
// Test forgetting a temporary by move-in.
|
2012-06-29 16:26:56 -07:00
|
|
|
test(@~[10]);
|
2011-08-09 17:56:26 -07:00
|
|
|
}
|