PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/type-namespace.rs

http://github.com/jruderman/rust
Rust | 5 lines | 3 code | 2 blank | 0 comment | 1 complexity | 76f917d3f7b34ac83d0b83a398ca76e3 MD5 | raw file
1type a = {a: int};
2
3fn a(a: a) -> int { return a.a; }
4
5fn main() { let x: a = {a: 1}; assert (a(x) == 1); }