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

16 lines
260 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(); } }
2011-07-27 07:19:39 -05:00
log bar;
}
none::<int>. { log "hello"; }
}
}
fn main() { foo(); }