2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2018-09-26 11:04:07 +00:00
|
|
|
#![allow(unused_mut)] // under NLL we get warning about `bar` below
|
2014-10-09 19:17:22 +00:00
|
|
|
fn baz() -> ! { panic!(); }
|
2011-05-28 03:41:48 +00:00
|
|
|
|
|
|
|
fn foo() {
|
2015-03-26 00:06:52 +00:00
|
|
|
match Some::<isize>(5) {
|
|
|
|
Some::<isize>(_x) => {
|
2012-03-22 15:39:41 +00:00
|
|
|
let mut bar;
|
2015-03-26 00:06:52 +00:00
|
|
|
match None::<isize> { None::<isize> => { bar = 5; } _ => { baz(); } }
|
2014-10-15 01:07:11 +00:00
|
|
|
println!("{}", bar);
|
2011-07-27 12:19:39 +00:00
|
|
|
}
|
2015-03-26 00:06:52 +00:00
|
|
|
None::<isize> => { println!("hello"); }
|
2011-06-15 18:19:50 +00:00
|
|
|
}
|
2011-05-28 03:41:48 +00:00
|
|
|
}
|
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() { foo(); }
|