From dbe2f8ad4dbaad9e6f718eca311cce5bffd02bc3 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 18 Jul 2023 16:10:01 +0200 Subject: 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 --- gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs (limited to 'gcc') 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() {} -- cgit v1.1