]> git.lizzy.rs Git - rust.git/blob - tests/ui/match/match-bot-panic.rs
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / ui / match / match-bot-panic.rs
1 // run-fail
2 // error-pattern:explicit panic
3 // ignore-emscripten no processes
4
5 #![allow(unreachable_code)]
6 #![allow(unused_variables)]
7
8 fn foo(s: String) {}
9
10 fn main() {
11     let i = match Some::<isize>(3) {
12         None::<isize> => panic!(),
13         Some::<isize>(_) => panic!(),
14     };
15     foo(i);
16 }