about summary refs log tree commit diff
path: root/tests/ui/span/macro-ty-params.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/span/macro-ty-params.rs')
-rw-r--r--tests/ui/span/macro-ty-params.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/span/macro-ty-params.rs b/tests/ui/span/macro-ty-params.rs
new file mode 100644
index 00000000000..cf28b0255d1
--- /dev/null
+++ b/tests/ui/span/macro-ty-params.rs
@@ -0,0 +1,15 @@
+macro_rules! m {
+    ($p1: path) => {
+        #[derive($p1)] struct U;
+    }
+}
+
+macro_rules! foo { () => () }
+
+fn main() {
+    foo::<T>!(); //~ ERROR generic arguments in macro path
+    foo::<>!(); //~ ERROR generic arguments in macro path
+    m!(Default<>);
+    //~^ ERROR unexpected generic arguments in path
+    //~^^ ERROR generic arguments in macro path
+}