]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/move-4-unique.rs
Merge branch 'method-vis-parse'
[rust.git] / src / test / run-pass / move-4-unique.rs
1 extern mod std;
2
3 fn test(foo: ~{a: int, b: int, c: int}) -> ~{a: int, b: int, c: int} {
4     let foo = foo;
5     let bar = move foo;
6     let baz = move bar;
7     let quux = move baz;
8     return quux;
9 }
10
11 fn main() { let x = ~{a: 1, b: 2, c: 3}; let y = test(x); assert (y.c == 3); }