aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3553.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/issue-3553.rs')
-rw-r--r--gcc/testsuite/rust/compile/issue-3553.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-3553.rs b/gcc/testsuite/rust/compile/issue-3553.rs
new file mode 100644
index 0000000..546f3c1
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3553.rs
@@ -0,0 +1,18 @@
+trait Foo {
+ fn f(&self) -> isize;
+}
+
+trait Bar: Foo {
+ fn g(&self) -> isize;
+}
+
+struct A {
+ x: isize,
+}
+
+impl Bar for A {
+ // { dg-error "the trait bound .A: Foo. is not satisfied .E0277." "" { target *-*-* } .-1 }
+ fn g(&self) -> isize {
+ self.f()
+ }
+}