// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. struct Foo { foo: bool, bar: Option, baz: int } 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(_), _} => {} } }