Skip to content

Commit

Permalink
Add a new test for mbe named macro_rules
Browse files Browse the repository at this point in the history
Macro rules named macro_rules may cause some problems if not handled
correctly. This new test ensure we always compile those macros named
macro_rules correctly as well as other macro definitions.

gcc/testsuite/ChangeLog:

	* rust/compile/macro57.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P committed Oct 17, 2023
1 parent 9762e09 commit c3b68b5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gcc/testsuite/rust/compile/macro57.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
macro_rules! macro_rules {
() => {};
}

macro_rules! foo {
() => {};
}

foo!();

fn main() {}

macro_rules!();

0 comments on commit c3b68b5

Please sign in to comment.