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

16 lines
290 B
Rust
Raw Normal View History

fn baz() -> ! { fail; }
fn foo() {
2012-08-06 14:34:08 -05:00
match some::<int>(5) {
2012-08-03 21:59:04 -05:00
some::<int>(x) => {
let mut bar;
2012-08-06 14:34:08 -05:00
match none::<int> { none::<int> => { bar = 5; } _ => { baz(); } }
log(debug, bar);
2011-07-27 07:19:39 -05:00
}
2012-08-22 19:24:52 -05:00
none::<int> => { debug!("hello"); }
}
}
fn main() { foo(); }