1
Fork 0
rust/src/test/ui/binding/expr-match-unique.rs

11 lines
245 B
Rust
Raw Normal View History

// run-pass
#![feature(box_syntax)]
2012-08-06 12:34:08 -07:00
// Tests for match as expressions resulting in boxed types
fn test_box() {
let res: Box<_> = match true { true => { box 100 }, _ => panic!() };
2015-01-25 22:05:03 +01:00
assert_eq!(*res, 100);
}
pub fn main() { test_box(); }