public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8541] gccrs: Add regression test for generic auto traits
@ 2024-01-30 11:58 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 11:58 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3e0e74f3e9cee9db52ef40ccacc4bc667a569455
commit r14-8541-g3e0e74f3e9cee9db52ef40ccacc4bc667a569455
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Mon Nov 20 13:53:51 2023 +0100
gccrs: 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.patry@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 }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 11:58 [gcc r14-8541] gccrs: Add regression test for generic auto traits Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).