1 #![allow(non_camel_case_types)]
2 
3 enum E { A, B, c }
4 
5 mod m {
6     const CONST1: usize = 10;
7     const Const2: usize = 20;
8 }
9 
main()10 fn main() {
11     let y = 1;
12     match y {
13        a | b => {} //~  ERROR variable `a` is not bound in all patterns
14                    //~| ERROR variable `b` is not bound in all patterns
15     }
16 
17     let x = (E::A, E::B);
18     match x {
19         (A, B) | (ref B, c) | (c, A) => ()
20         //~^ ERROR variable `A` is not bound in all patterns
21         //~| ERROR variable `B` is not bound in all patterns
22         //~| ERROR variable `B` is bound inconsistently
23         //~| ERROR mismatched types
24         //~| ERROR variable `c` is not bound in all patterns
25         //~| HELP consider making the path in the pattern qualified: `?::A`
26     }
27 
28     let z = (10, 20);
29     match z {
30         (CONST1, _) | (_, Const2) => ()
31         //~^ ERROR variable `CONST1` is not bound in all patterns
32         //~| HELP consider making the path in the pattern qualified: `?::CONST1`
33         //~| ERROR variable `Const2` is not bound in all patterns
34         //~| HELP consider making the path in the pattern qualified: `?::Const2`
35     }
36 }
37