2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
2011-06-15 11:19:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-09 15:17:22 -04:00
|
|
|
// When all branches of a match expression result in panic, the entire
|
|
|
|
// match expression results in panic.
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
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 }
|
2014-10-09 15:17:22 -04:00
|
|
|
false => { match true { true => { panic!() } false => { panic!() } } }
|
2011-06-15 11:19:50 -07:00
|
|
|
};
|
2011-08-19 15:16:48 -07:00
|
|
|
}
|