]> git.lizzy.rs Git - rust.git/blob - src/test/ui/expr-if-unique.rs
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[rust.git] / src / test / ui / expr-if-unique.rs
1 // run-pass
2
3 #![feature(box_syntax)]
4
5 // Tests for if as expressions returning boxed types
6 fn test_box() {
7     let rs: Box<_> = if true { box 100 } else { box 101 };
8     assert_eq!(*rs, 100);
9 }
10
11 pub fn main() { test_box(); }