about summary refs log tree commit diff
path: root/tests/ui/pattern/usefulness/nested-exhaustive-match.rs
blob: 23782a49b5bbefd198694a55a47c9ff9c09abf5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass
#![allow(dead_code)]

struct Foo { foo: bool, bar: Option<isize>, baz: isize }

pub fn main() {
    match (Foo{foo: true, bar: Some(10), baz: 20}) {
      Foo{foo: true, bar: Some(_), ..} => {}
      Foo{foo: false, bar: None, ..} => {}
      Foo{foo: true, bar: None, ..} => {}
      Foo{foo: false, bar: Some(_), ..} => {}
    }
}