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.
11 // Test that codegen works correctly when there are multiple refutable
12 // patterns in match expression.
14 // pretty-expanded FIXME #23616
22 let r = match (Foo::FooNullary, 'a') {
23 (Foo::FooUint(..), 'a'...'z') => 1,
24 (Foo::FooNullary, 'x') => 2,
29 let r = match (Foo::FooUint(0), 'a') {
30 (Foo::FooUint(1), 'a'...'z') => 1,
31 (Foo::FooUint(..), 'x') => 2,
32 (Foo::FooNullary, 'a') => 3,
37 let r = match ('a', Foo::FooUint(0)) {
38 ('a'...'z', Foo::FooUint(1)) => 1,
39 ('x', Foo::FooUint(..)) => 2,
40 ('a', Foo::FooNullary) => 3,
45 let r = match ('a', 'a') {
46 ('a'...'z', 'b') => 1,
47 ('x', 'a'...'z') => 2,
52 let r = match ('a', 'a') {
53 ('a'...'z', 'b') => 1,
54 ('x', 'a'...'z') => 2,