]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/expr-match-panic.rs
Rollup merge of #93663 - sunfishcode:sunfishcode/as-raw-name, r=joshtriplett
[rust.git] / src / test / ui / binding / expr-match-panic.rs
1 // run-pass
2
3
4 fn test_simple() {
5     let r = match true { true => { true } false => { panic!() } };
6     assert_eq!(r, true);
7 }
8
9 fn test_box() {
10     let r = match true { true => { vec![10] } false => { panic!() } };
11     assert_eq!(r[0], 10);
12 }
13
14 pub fn main() { test_simple(); test_box(); }