From: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>

Add a new regression test to highlight the error behavior with a super
trait on an auto trait.

gcc/testsuite/ChangeLog:

        * rust/compile/auto_trait_super_trait.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>
---
 gcc/testsuite/rust/compile/auto_trait_super_trait.rs | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/auto_trait_super_trait.rs

diff --git a/gcc/testsuite/rust/compile/auto_trait_super_trait.rs 
b/gcc/testsuite/rust/compile/auto_trait_super_trait.rs
new file mode 100644
index 00000000000..1080afb5124
--- /dev/null
+++ b/gcc/testsuite/rust/compile/auto_trait_super_trait.rs
@@ -0,0 +1,4 @@
+trait Cold {}
+
+auto trait IsCool: Cold {}
+// { dg-error "auto traits cannot have super traits .E0568." "" { target *-*-* 
} .-1 }
-- 
2.42.1

Reply via email to