rust/tests/ui/binding/expr-match-panic-all.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
294 B
Rust
Raw Normal View History

// run-pass
// When all branches of a match expression result in panic, the entire
// match expression results in panic.
pub fn main() {
2013-08-17 10:37:42 -05:00
let _x =
2012-08-06 14:34:08 -05:00
match true {
2015-01-25 15:05:03 -06:00
true => { 10 }
false => { match true { true => { panic!() } false => { panic!() } } }
};
}