diff options
Diffstat (limited to 'tests/ui/hygiene/auxiliary/local_inner_macros.rs')
-rw-r--r-- | tests/ui/hygiene/auxiliary/local_inner_macros.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/hygiene/auxiliary/local_inner_macros.rs b/tests/ui/hygiene/auxiliary/local_inner_macros.rs new file mode 100644 index 000000000..4296ae2fd --- /dev/null +++ b/tests/ui/hygiene/auxiliary/local_inner_macros.rs @@ -0,0 +1,19 @@ +#[macro_export] +macro_rules! helper1 { + () => ( struct S; ) +} + +#[macro_export(local_inner_macros)] +macro_rules! helper2 { + () => ( helper1!(); ) +} + +#[macro_export(local_inner_macros)] +macro_rules! public_macro { + () => ( helper2!(); ) +} + +#[macro_export(local_inner_macros)] +macro_rules! public_macro_dynamic { + ($helper: ident) => ( $helper!(); ) +} |