summary refs log tree commit diff
path: root/src/test/run-pass/move-arg-2-unique.rs
blob: dde8e6d4d40d9488122596620625e1cb09683359 (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]);
}