]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/nested-matchs.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / nested-matchs.rs
1 // run-pass
2 #![allow(unused_mut)] // under NLL we get warning about `bar` below
3 fn baz() -> ! { panic!(); }
4
5 fn foo() {
6     match Some::<isize>(5) {
7       Some::<isize>(_x) => {
8         let mut bar;
9         match None::<isize> { None::<isize> => { bar = 5; } _ => { baz(); } }
10         println!("{}", bar);
11       }
12       None::<isize> => { println!("hello"); }
13     }
14 }
15
16 pub fn main() { foo(); }