]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/nested-matchs.rs
Merge commit '6ed6f1e6a1a8f414ba7e6d9b8222e7e5a1686e42' into clippyup
[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(); }