rust/src/test/run-pass/alt-phi.rs

15 lines
206 B
Rust
Raw Normal View History

enum thing { a, b, c, }
2012-01-23 16:59:00 -06:00
fn foo(it: fn(int)) { it(10); }
fn main() {
let mut x = true;
2011-07-27 07:19:39 -05:00
alt a {
2012-08-03 21:59:04 -05:00
a => { x = true; foo(|_i| { } ) }
b => { x = false; }
c => { x = false; }
}
}