From: Pierre-Emmanuel Patry Date: Tue, 18 Jul 2023 14:10:01 +0000 (+0200) Subject: gccrs: Add a test for malformed derive declaration input X-Git-Tag: basepoints/gcc-15~2330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbe2f8ad4dbaad9e6f718eca311cce5bffd02bc3;p=thirdparty%2Fgcc.git 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 --- 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 000000000000..d83256b8a2ee --- /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() {}