PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

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

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