416331ca XL |
1 | // run-pass |
2 | |
223e47cc LB |
3 | // Tests for if as expressions returning boxed types |
4 | fn test_box() { |
c295e0f8 |
5 | let rs: Box<_> = if true { Box::new(100) } else { Box::new(101) }; |
85aaf69f |
6 | assert_eq!(*rs, 100); |
223e47cc LB |
7 | } |
8 | |
9 | pub fn main() { test_box(); } |