aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/multiple_bindings2.rs
blob: e62b18f6843a817fa3f773ff56e5ba46ea23f0eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn main()
{
  match (1, 2) {
    (a, a) => {},
  }
  // { dg-error "identifier .a. is bound more than once in the same pattern .E0416." "" { target *-*-* } .-2 }

  if let (a, a) = (1, 2) {}
  // { dg-error "identifier .a. is bound more than once in the same pattern .E0416." "" { target *-*-* } .-1 }

  let (a, a) = (1, 2);
  // { dg-error "identifier .a. is bound more than once in the same pattern .E0416." "" { target *-*-* } .-1 }

}