PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/move-4.rs

http://github.com/jruderman/rust
Rust | 13 lines | 10 code | 3 blank | 0 comment | 1 complexity | b7cf3540f8d16ef3a0994d1f94c92f51 MD5 | raw file
 1
 2use std;
 3import uint;
 4
 5fn test(foo: @{a: int, b: int, c: int}) -> @{a: int, b: int, c: int} {
 6    let foo = foo;
 7    let bar <- foo;
 8    let baz <- bar;
 9    let quux <- baz;
10    return quux;
11}
12
13fn main() { let x = @{a: 1, b: 2, c: 3}; let y = test(x); assert (y.c == 3); }