]> git.lizzy.rs Git - rust.git/blob - tests/ui/expr-if-panic-all.rs
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / expr-if-panic-all.rs
1 // run-pass
2 // When all branches of an if expression result in panic, the entire if
3 // expression results in panic.
4
5 pub fn main() {
6     let _x = if true {
7         10
8     } else {
9         if true { panic!() } else { panic!() }
10     };
11 }