summary refs log tree commit diff
path: root/src/test/run-pass/expr-if-unique.rs
blob: ef76fb27e9d3ddc600a60c851c78c1a9a81fc332 (plain)
1
2
3
4
5
6
7
8
9
#![feature(box_syntax)]

// Tests for if as expressions returning boxed types
fn test_box() {
    let rs: Box<_> = if true { box 100 } else { box 101 };
    assert_eq!(*rs, 100);
}

pub fn main() { test_box(); }