rust/src/test/run-pass/alt-phi.rs
2012-07-01 19:19:32 -07:00

15 lines
197 B
Rust

enum thing { a, b, c, }
fn foo(it: fn(int)) { it(10); }
fn main() {
let mut x = true;
alt a {
a { x = true; foo(|_i| { } ) }
b { x = false; }
c { x = false; }
}
}