19 lines
293 B
Rust
19 lines
293 B
Rust
|
|
use std;
|
|
import std::option::*;
|
|
|
|
fn baz() -> ! { fail; }
|
|
|
|
fn foo() {
|
|
alt some::<int>(5) {
|
|
some::<int>(x) {
|
|
let bar;
|
|
alt none::<int> { none::<int>. { bar = 5; } _ { baz(); } }
|
|
log bar;
|
|
}
|
|
none::<int>. { log "hello"; }
|
|
}
|
|
}
|
|
|
|
fn main() { foo(); }
|