Debian Codegraph @

gcc/testsuite/rust/compile/multiple_bindings1.rs

raw
1 fn f1(i: i32, i: i32) {}
2 // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
3
4 trait Foo {
5 fn f2(i: i32, i: i32) {}
6 // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
7 }
8
9 trait Bar {
10 fn f3(i: i32, j: i32) {}
11 }
12
13 struct S;
14
15 impl S {
16 fn f4(i: i32, i: i32) {}
17 // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
18 }
19
20 impl Bar for S {
21 fn f3(i: i32, i: i32) {}
22 // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
23 }
24
25 fn main() {
26 let _ = |i, i| {};
27 // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
28 }
29