public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7809] gccrs: Add a test for malformed derive declaration input
@ 2024-01-16 18:00 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:00 UTC (permalink / raw)
  To: gcc-cvs

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

commit r14-7809-gdbe2f8ad4dbaad9e6f718eca311cce5bffd02bc3
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Jul 18 16:10:01 2023 +0200

    gccrs: Add a test for malformed derive declaration input
    
    Add a new test to highlight possible future regressions on malformed
    proc_macro_derive input.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/proc_macro_derive_malformed.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

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

diff --git a/gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs b/gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs
new file mode 100644
index 00000000000..d83256b8a2e
--- /dev/null
+++ b/gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs
@@ -0,0 +1,4 @@
+// { dg-additional-options "-frust-crate-type=proc-macro" }
+
+#[proc_macro_derive] // { dg-excess-errors "malformed 'proc_macro_derive' attribute input" }
+pub fn my_invalid_macro() {}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-16 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:00 [gcc r14-7809] gccrs: Add a test for malformed derive declaration input 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).