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