]> git.lizzy.rs Git - rust.git/blob - src/test/ui/expr-if-panic-all.rs
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
[rust.git] / src / test / 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 }