summary refs log tree commit diff
path: root/src/test/run-pass/nested-alts.rs
blob: 29ffe6e4bc0ff6e8e9037ebaee21d7cd354c0b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

fn baz() -> ! { fail; }

fn foo() {
    alt some::<int>(5) {
      some::<int>(x) {
        let bar;
        alt none::<int> { none::<int> { bar = 5; } _ { baz(); } }
        log(debug, bar);
      }
      none::<int> { #debug("hello"); }
    }
}

fn main() { foo(); }