]> git.lizzy.rs Git - rust.git/blob - src/test/ui/expr-if-panic-all.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }