2011-09-12 12:39:38 +02:00
|
|
|
fn test(-foo: @[int]) { assert (foo[0] == 10); }
|
2011-08-09 17:56:26 -07:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 15:16:48 -07:00
|
|
|
let x = @[10];
|
2011-08-09 17:56:26 -07:00
|
|
|
// Test forgetting a local by move-in
|
|
|
|
test(x);
|
|
|
|
|
|
|
|
// Test forgetting a temporary by move-in.
|
2011-08-19 15:16:48 -07:00
|
|
|
test(@[10]);
|
2011-08-09 17:56:26 -07:00
|
|
|
}
|