blob: 65a3913132c1ca5c736739d71d73800bea613378 (
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]);
}
|