aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-07-18 16:10:01 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-07-20 08:21:00 +0000
commitaaeeaa2f7775f6f672aa490884c01217fd1c3f5d (patch)
tree0f67035d7fe6c276bfee1e14ebd6a632d591342e
parent242f7a92673e37d4e278174995ae428e03fa3ed0 (diff)
downloadgcc-aaeeaa2f7775f6f672aa490884c01217fd1c3f5d.zip
gcc-aaeeaa2f7775f6f672aa490884c01217fd1c3f5d.tar.gz
gcc-aaeeaa2f7775f6f672aa490884c01217fd1c3f5d.tar.bz2
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>
-rw-r--r--gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs4
1 files changed, 4 insertions, 0 deletions
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 0000000..d83256b
--- /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() {}