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

16 lines
283 B
Rust
Raw Normal View History

fn baz() -> ! { fail; }
fn foo() {
alt some::<int>(5) {
some::<int>(x) {
2011-07-27 07:19:39 -05:00
let bar;
alt none::<int> { none::<int>. { bar = 5; } _ { baz(); } }
log_full(core::debug, bar);
2011-07-27 07:19:39 -05:00
}
none::<int>. { #debug("hello"); }
}
}
fn main() { foo(); }