aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/traits5.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/traits5.rs')
-rw-r--r--gcc/testsuite/rust/compile/traits5.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/traits5.rs b/gcc/testsuite/rust/compile/traits5.rs
new file mode 100644
index 0000000..8b2fb9b
--- /dev/null
+++ b/gcc/testsuite/rust/compile/traits5.rs
@@ -0,0 +1,9 @@
+trait Foo {
+ const A: i32;
+
+ fn test(self);
+}
+
+struct Bar;
+impl Foo for Bar {}
+// { dg-error "missing A, test in implementation of trait .Foo." "" { target *-*-* } .-1 }