]> git.lizzy.rs Git - rust.git/blob - tests/ui/expr-if-unique.rs
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / expr-if-unique.rs
1 // run-pass
2
3 // Tests for if as expressions returning boxed types
4 fn test_box() {
5     let rs: Box<_> = if true { Box::new(100) } else { Box::new(101) };
6     assert_eq!(*rs, 100);
7 }
8
9 pub fn main() { test_box(); }