1 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
23 ::Foo::Bar(3) => panic!(),
24 ::Foo::Bar(_) if false => panic!(),
25 ::Foo::Bar(..) if false => panic!(),
26 ::Foo::Bar(_n) => panic!(),
31 ::Foo::Bar(_) if false => panic!(),
32 ::Foo::Bar(..) if false => panic!(),
33 ::Foo::Bar(_n) => panic!(),
34 ::Foo::Baz => panic!(),
37 ::Foo::Bar(3) => panic!(),
38 ::Foo::Bar(_) if false => panic!(),
39 ::Foo::Bar(..) if false => panic!(),
40 ::Foo::Bar(n) => assert_eq!(n, 4),
41 ::Foo::Baz => panic!(),
44 match Other::Other1(Foo::Baz) {
45 ::Other::Other1(::Foo::Baz) => {}
46 ::Other::Other1(::Foo::Bar(_)) => {}
47 ::Other::Other2(::Foo::Baz, ::Foo::Bar(_)) => {}
48 ::Other::Other2(::Foo::Bar(..), ::Foo::Baz) => {}
49 ::Other::Other2(..) => {}