rust/src/test/run-pass/use-uninit-alt.rs
2012-08-06 15:36:30 -07:00

12 lines
205 B
Rust

fn foo<T>(o: myoption<T>) -> int {
let mut x: int = 5;
match o { none::<T> => { } some::<T>(t) => { x += 1; } }
return x;
}
enum myoption<T> { none, some(T), }
fn main() { log(debug, 5); }