summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/issue-52169.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/macros/issue-52169.rs')
-rw-r--r--src/test/ui/macros/issue-52169.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/macros/issue-52169.rs b/src/test/ui/macros/issue-52169.rs
new file mode 100644
index 000000000..f178cd30c
--- /dev/null
+++ b/src/test/ui/macros/issue-52169.rs
@@ -0,0 +1,15 @@
+// run-pass
+
+#[allow(unused_macro_rules)]
+macro_rules! a {
+ ($i:literal) => { "right" };
+ ($i:tt) => { "wrong" };
+}
+
+macro_rules! b {
+ ($i:literal) => { a!($i) };
+}
+
+fn main() {
+ assert_eq!(b!(0), "right");
+}