1 // Regression test for #57597.
3 // Make sure that nested matchers work correctly rather than causing an infinite loop or crash.
8 ($($($i:ident)?)+) => {};
9 //~^ ERROR repetition matches empty token tree
13 ($($($i:ident)?)*) => {};
14 //~^ ERROR repetition matches empty token tree
18 ($($($i:ident)?)?) => {};
19 //~^ ERROR repetition matches empty token tree
23 ($($($($i:ident)?)?)?) => {};
24 //~^ ERROR repetition matches empty token tree
28 ($($($($i:ident)*)?)?) => {};
29 //~^ ERROR repetition matches empty token tree
33 ($($($($i:ident)?)*)?) => {};
34 //~^ ERROR repetition matches empty token tree
38 ($($($($i:ident)?)?)*) => {};
39 //~^ ERROR repetition matches empty token tree
43 ($($($($i:ident)*)*)?) => {};
44 //~^ ERROR repetition matches empty token tree
48 ($($($($i:ident)?)*)*) => {};
49 //~^ ERROR repetition matches empty token tree
53 ($($($($i:ident)?)*)+) => {};
54 //~^ ERROR repetition matches empty token tree
58 ($($($($i:ident)+)?)*) => {};
59 //~^ ERROR repetition matches empty token tree
63 ($($($($i:ident)+)*)?) => {};
64 //~^ ERROR repetition matches empty token tree