about summary refs log tree commit diff
path: root/src/test/ui/if/expr-if-panic.rs
blob: 4ab73dc736a3a6da420574727e88d02d15fe8ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-fail
// error-pattern:explicit panic

fn main() {
    let _x = if false {
        0
    } else if true {
        panic!()
    } else {
        10
    };
}