about summary refs log tree commit diff
path: root/tests/ui/macros/macro-expand-within-generics-in-path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/macro-expand-within-generics-in-path.rs')
-rw-r--r--tests/ui/macros/macro-expand-within-generics-in-path.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-expand-within-generics-in-path.rs b/tests/ui/macros/macro-expand-within-generics-in-path.rs
new file mode 100644
index 00000000000..017d5152221
--- /dev/null
+++ b/tests/ui/macros/macro-expand-within-generics-in-path.rs
@@ -0,0 +1,19 @@
+// issue#123911
+// issue#123912
+
+macro_rules! m {
+    ($p: path) => {
+        #[$p]
+        struct S;
+    };
+}
+
+macro_rules! p {
+    () => {};
+}
+
+m!(generic<p!()>);
+//~^ ERROR: unexpected generic arguments in path
+//~| ERROR: cannot find attribute `generic` in this scope
+
+fn main() {}