]> git.lizzy.rs Git - rust.git/blob - src/test/ui/expr-if-panic-all.rs
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree
[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 }