2020-04-16 15:50:32 +09:00
|
|
|
// run-fail
|
2014-10-28 14:07:33 -04:00
|
|
|
// error-pattern:explicit panic
|
2020-05-08 00:39:02 +09:00
|
|
|
// ignore-emscripten no processes
|
2011-06-11 00:27:34 +00:00
|
|
|
|
2016-05-27 08:09:36 +05:30
|
|
|
fn f() -> ! {
|
|
|
|
panic!()
|
|
|
|
}
|
2011-06-11 00:27:34 +00:00
|
|
|
|
2016-05-27 08:09:36 +05:30
|
|
|
fn g() -> isize {
|
|
|
|
let x = match true {
|
|
|
|
true => f(),
|
|
|
|
false => 10,
|
|
|
|
};
|
|
|
|
return x;
|
|
|
|
}
|
2011-06-11 00:27:34 +00:00
|
|
|
|
2016-05-27 08:09:36 +05:30
|
|
|
fn main() {
|
|
|
|
g();
|
|
|
|
}
|