rust/tests/ui/pattern/usefulness/nested-exhaustive-match.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
377 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616
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(_), ..} => {}
2012-02-15 10:09:52 -06:00
}
}