]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3038.rs
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-3038.rs
1 enum F { G(isize, isize) }
2
3 enum H { I(J, K) }
4
5 enum J { L(isize, isize) }
6 enum K { M(isize, isize) }
7
8 fn main()
9 {
10
11     let _z = match F::G(1, 2) {
12       F::G(x, x) => { println!("{}", x + x); }
13       //~^ ERROR identifier `x` is bound more than once in the same pattern
14     };
15
16     let _z = match H::I(J::L(1, 2), K::M(3, 4)) {
17       H::I(J::L(x, _), K::M(_, x))
18       //~^ ERROR identifier `x` is bound more than once in the same pattern
19         => { println!("{}", x + x); }
20     };
21
22     let _z = match (1, 2) {
23         (x, x) => { x } //~ ERROR identifier `x` is bound more than once in the same pattern
24     };
25
26 }