summaryrefslogtreecommitdiffstats
path: root/tests/ui/match/match-bot-panic.rs
blob: e4a6f6d6fe44a5bb2c42d60ff14d699be4626d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-fail
// error-pattern:explicit panic
// ignore-emscripten no processes

#![allow(unreachable_code)]
#![allow(unused_variables)]

fn foo(s: String) {}

fn main() {
    let i = match Some::<isize>(3) {
        None::<isize> => panic!(),
        Some::<isize>(_) => panic!(),
    };
    foo(i);
}