blob: 01e287c0db0939131b73e2d71c1d36f4611682a7 (
plain)
1
2
3
4
5
6
7
8
9
10
|
fn test(-foo: @~[int]) { assert (foo[0] == 10); }
fn main() {
let x = @~[10];
// Test forgetting a local by move-in
test(x);
// Test forgetting a temporary by move-in.
test(@~[10]);
}
|