about summary refs log tree commit diff
path: root/tests/ui/macros/remove-repetition-issue-139480.rs
blob: 1efb4306763e47a01baf7c378f4423d2e398531e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
macro_rules! ciallo {
    ($($v: vis)? $name: ident) => {
    //~^ error: repetition matches empty token tree
    };
}

macro_rules! meow {
    ($name: ident $($v: vis)?) => {
    //~^ error: repetition matches empty token tree
    };
}

macro_rules! gbc {
    ($name: ident $/*
        this comment gets removed by the suggestion
        */
        ($v: vis)?) => {
    //~^ error: repetition matches empty token tree
    };
}

ciallo!(hello);

meow!(miaow, pub);

gbc!(mygo,);

fn main() {}