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 15:37:42 +00:00
let _x =
2012-08-06 19:34:08 +00:00
match true {
2015-01-25 21:05:03 +00:00
true => { 10 }
false => { match true { true => { panic!() } false => { panic!() } } }
};
}