rust/src/test/run-pass/binding/expr-match-unique.rs
2018-12-25 21:08:33 -07:00

10 lines
245 B
Rust

// run-pass
#![feature(box_syntax)]
// Tests for match as expressions resulting in boxed types
fn test_box() {
let res: Box<_> = match true { true => { box 100 }, _ => panic!() };
assert_eq!(*res, 100);
}
pub fn main() { test_box(); }