https://gcc.gnu.org/g:c500e77a5251f8ec0c8aff51b078efaa3407ecb9

commit c500e77a5251f8ec0c8aff51b078efaa3407ecb9
Author: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>
Date:   Mon Nov 20 13:53:51 2023 +0100

    Add regression test for generic auto traits
    
    Generics are forbidden on auto traits and an error should be emitted.
    This commit highlight this behavior.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/generic_auto_trait.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.pa...@embecosm.com>

Diff:
---
 gcc/testsuite/rust/compile/generic_auto_trait.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/rust/compile/generic_auto_trait.rs 
b/gcc/testsuite/rust/compile/generic_auto_trait.rs
new file mode 100644
index 000000000000..ae6a51d0244c
--- /dev/null
+++ b/gcc/testsuite/rust/compile/generic_auto_trait.rs
@@ -0,0 +1,2 @@
+auto trait IsCooler<G> {}
+// { dg-error "auto traits cannot have generic parameters .E0567." "" { target 
*-*-* } .-1 }

Reply via email to