]> git.proxmox.com Git - rustc.git/blame_incremental - 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
1// run-pass
2
3// Tests for if as expressions returning boxed types
4fn test_box() {
5 let rs: Box<_> = if true { Box::new(100) } else { Box::new(101) };
6 assert_eq!(*rs, 100);
7}
8
9pub fn main() { test_box(); }