diff options
Diffstat (limited to 'tests/ui/hygiene/eager-from-opaque-2.rs')
-rw-r--r-- | tests/ui/hygiene/eager-from-opaque-2.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/hygiene/eager-from-opaque-2.rs b/tests/ui/hygiene/eager-from-opaque-2.rs new file mode 100644 index 000000000..220e55267 --- /dev/null +++ b/tests/ui/hygiene/eager-from-opaque-2.rs @@ -0,0 +1,22 @@ +// Regression test for the issue #63460. + +// check-pass + +#[macro_export] +macro_rules! separator { + () => { "/" }; +} + +#[macro_export] +macro_rules! concat_separator { + ( $e:literal, $($other:literal),+ ) => { + concat!($e, $crate::separator!(), $crate::concat_separator!($($other),+)) + }; + ( $e:literal ) => { + $e + } +} + +fn main() { + println!("{}", concat_separator!(2, 3, 4)) +} |