public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8572] gccrs: Add a regression test for unsafe module validation
@ 2024-01-30 12:00 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 12:00 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:088e3b0b7af1b6a38057c8717227867831d00c5e
commit r14-8572-g088e3b0b7af1b6a38057c8717227867831d00c5e
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Nov 21 19:34:36 2023 +0100
gccrs: Add a regression test for unsafe module validation
Add a new test to check for unsafe modules during AST validation pass.
gcc/testsuite/ChangeLog:
* rust/compile/unsafe_module.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/testsuite/rust/compile/unsafe_module.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/testsuite/rust/compile/unsafe_module.rs b/gcc/testsuite/rust/compile/unsafe_module.rs
new file mode 100644
index 000000000000..74bc170be5b0
--- /dev/null
+++ b/gcc/testsuite/rust/compile/unsafe_module.rs
@@ -0,0 +1,2 @@
+unsafe mod toto {}
+// { dg-error "module cannot be declared unsafe" "" { target *-*-* } .-1 }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 12:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 12:00 [gcc r14-8572] gccrs: Add a regression test for unsafe module validation 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).