1
Fork 0
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
295 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 08:37:42 -07:00
let _x =
2012-08-06 12:34:08 -07:00
match true {
2015-01-25 22:05:03 +01:00
true => { 10 }
false => { match true { true => { panic!() } false => { panic!() } } }
};
}