rust/src/test/run-pass/nested-alts.rs

16 lines
290 B
Rust
Raw Normal View History

fn baz() -> ! { fail; }
fn foo() {
2012-08-20 14:23:37 -05:00
match Some::<int>(5) {
Some::<int>(x) => {
let mut bar;
2012-08-20 14:23:37 -05:00
match None::<int> { None::<int> => { bar = 5; } _ => { baz(); } }
log(debug, bar);
2011-07-27 07:19:39 -05:00
}
2012-08-20 14:23:37 -05:00
None::<int> => { debug!("hello"); }
}
}
fn main() { foo(); }