summary refs log tree commit diff
path: root/src/test/run-pass/expr-if-unique.rs
blob: 61442fed5f5aea65073b260f6ea07d7f6987ffed (plain)
1
2
3
4
5
6
7
8
9
10
11
12



// -*- rust -*-

// Tests for if as expressions returning boxed types
fn test_box() {
    let rs = if true { ~100 } else { ~101 };
    assert (*rs == 100);
}

fn main() { test_box(); }