aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/multiple_bindings1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/multiple_bindings1.rs')
-rw-r--r--gcc/testsuite/rust/compile/multiple_bindings1.rs29
1 files changed, 19 insertions, 10 deletions
diff --git a/gcc/testsuite/rust/compile/multiple_bindings1.rs b/gcc/testsuite/rust/compile/multiple_bindings1.rs
index e73dc2a..8a2e18c 100644
--- a/gcc/testsuite/rust/compile/multiple_bindings1.rs
+++ b/gcc/testsuite/rust/compile/multiple_bindings1.rs
@@ -1,29 +1,38 @@
+#[lang = "sized"]
+pub trait Sized {}
+
+#[lang = "fn_once"]
+trait FnOnce<Args> {
+ type Output;
+
+ fn call_once(self, args: Args) -> Self::Output;
+}
+
fn f1(i: i32, i: i32) {}
// { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
trait Foo {
- fn f2(i: i32, i: i32) {}
- // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
+ fn f2(i: i32, i: i32) {}
+ // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
}
trait Bar {
- fn f3(i: i32, j: i32) {}
+ fn f3(i: i32, j: i32) {}
}
struct S;
impl S {
- fn f4(i: i32, i: i32) {}
- // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
+ fn f4(i: i32, i: i32) {}
+ // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
}
impl Bar for S {
- fn f3(i: i32, i: i32) {}
- // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
+ fn f3(i: i32, i: i32) {}
+ // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
}
fn main() {
- let _ = |i, i| {};
- // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
+ let _ = |i, i| {};
+ // { dg-error "identifier .i. is bound more than once in the same parameter list .E0415." "" { target *-*-* } .-1 }
}
-