]> git.proxmox.com Git - rustc.git/blame - tests/ui/box/unit/expr-if-unique.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / tests / ui / box / unit / expr-if-unique.rs
CommitLineData
416331ca
XL
1// run-pass
2
223e47cc
LB
3// Tests for if as expressions returning boxed types
4fn 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
9pub fn main() { test_box(); }