summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/issue-5060.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/issue-5060.rs')
-rw-r--r--tests/ui/macros/issue-5060.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/macros/issue-5060.rs b/tests/ui/macros/issue-5060.rs
new file mode 100644
index 000000000..c4760bc02
--- /dev/null
+++ b/tests/ui/macros/issue-5060.rs
@@ -0,0 +1,16 @@
+// run-pass
+macro_rules! print_hd_tl {
+ ($field_hd:ident, $($field_tl:ident),+) => ({
+ print!("{}", stringify!($field_hd));
+ print!("::[");
+ $(
+ print!("{}", stringify!($field_tl));
+ print!(", ");
+ )+
+ print!("]\n");
+ })
+}
+
+pub fn main() {
+ print_hd_tl!(x, y, z, w)
+}