Skip to content

Commit

Permalink
Add a test for malformed derive declaration input
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
P-E-P committed Jul 20, 2023
1 parent 242f7a9 commit aaeeaa2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gcc/testsuite/rust/compile/proc_macro_derive_malformed.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit aaeeaa2

Please sign in to comment.