]> git.lizzy.rs Git - rust.git/blob - tests/ui/binding/expr-match-unique.rs
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / binding / expr-match-unique.rs
1 // run-pass
2
3 // Tests for match as expressions resulting in boxed types
4 fn test_box() {
5     let res: Box<_> = match true { true => { Box::new(100) }, _ => panic!() };
6     assert_eq!(*res, 100);
7 }
8
9 pub fn main() { test_box(); }