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