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

/src/test/run-pass/use-uninit-alt.rs

http://github.com/jruderman/rust
Rust | 11 lines | 7 code | 4 blank | 0 comment | 0 complexity | 6f3d7240550e3b8b304001f652fb0263 MD5 | raw file
 1
 2
 3fn foo<T>(o: myoption<T>) -> int {
 4    let mut x: int = 5;
 5    match o { none::<T> => { } some::<T>(t) => { x += 1; } }
 6    return x;
 7}
 8
 9enum myoption<T> { none, some(T), }
10
11fn main() { log(debug, 5); }