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