summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/issue-5060.rs
blob: c4760bc029b620519e4ba4f8b5a9358d66be9821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
}