summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/macro-followed-by-seq-bad.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/macros/macro-followed-by-seq-bad.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/macros/macro-followed-by-seq-bad.rs b/src/test/ui/macros/macro-followed-by-seq-bad.rs
new file mode 100644
index 000000000..b73742f77
--- /dev/null
+++ b/src/test/ui/macros/macro-followed-by-seq-bad.rs
@@ -0,0 +1,11 @@
+// Regression test for issue #25436: check that things which can be
+// followed by any token also permit X* to come afterwards.
+
+#![allow(unused_macros)]
+
+macro_rules! foo {
+ ( $a:expr $($b:tt)* ) => { }; //~ ERROR not allowed for `expr` fragments
+ ( $a:ty $($b:tt)* ) => { }; //~ ERROR not allowed for `ty` fragments
+}
+
+fn main() { }