]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/nested-exhaustive-match.rs
Rollup merge of #80298 - PankajChaudhary5:PankajChaudhary, r=GuillaumeGomez
[rust.git] / src / test / ui / pattern / usefulness / nested-exhaustive-match.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 struct Foo { foo: bool, bar: Option<isize>, baz: isize }
6
7 pub fn main() {
8     match (Foo{foo: true, bar: Some(10), baz: 20}) {
9       Foo{foo: true, bar: Some(_), ..} => {}
10       Foo{foo: false, bar: None, ..} => {}
11       Foo{foo: true, bar: None, ..} => {}
12       Foo{foo: false, bar: Some(_), ..} => {}
13     }
14 }