2014-01-30 19:29:35 +01:00
|
|
|
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
2012-12-10 17:32:48 -08:00
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
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.
|
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
|
|
|
}
|