mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
17 lines
395 B
Rust
17 lines
395 B
Rust
//@ run-pass
|
|
#![allow(unused_mut)] // under NLL we get warning about `bar` below
|
|
fn baz() -> ! { panic!(); }
|
|
|
|
fn foo() {
|
|
match Some::<isize>(5) {
|
|
Some::<isize>(_x) => {
|
|
let mut bar;
|
|
match None::<isize> { None::<isize> => { bar = 5; } _ => { baz(); } }
|
|
println!("{}", bar);
|
|
}
|
|
None::<isize> => { println!("hello"); }
|
|
}
|
|
}
|
|
|
|
pub fn main() { foo(); }
|