2012-06-26 00:38:29 -05:00
|
|
|
fn test(-foo: @[int]/~) { assert (foo[0] == 10); }
|
2011-08-09 19:56:26 -05:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-25 22:00:46 -05:00
|
|
|
let x = @[10]/~;
|
2011-08-09 19:56:26 -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-08-09 19:56:26 -05:00
|
|
|
}
|