]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-39698.rs
Auto merge of #45898 - JRegimbal:master, r=QuietMisdreavus
[rust.git] / src / test / ui / span / issue-39698.rs
1 // Copyright 2017 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.
4 //
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.
10
11 enum T {
12     T1(i32, i32),
13     T2(i32, i32),
14     T3(i32),
15     T4(i32),
16 }
17
18 fn main() {
19     match T::T1(123, 456) {
20         T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); }
21         //~^ ERROR is not bound in all patterns
22         //~| ERROR is not bound in all patterns
23         //~| ERROR is not bound in all patterns
24         //~| ERROR is not bound in all patterns
25     }
26 }