<p dir="auto">This causes an infinite loop:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="macro_rules! m {
    ( $()+ )  =&gt; ();
}

m!();"><pre class="notranslate"><span class="pl-k">macro_rules!</span> m <span class="pl-kos">{</span>
    <span class="pl-kos">(</span> $<span class="pl-kos">(</span><span class="pl-kos">)</span>+ <span class="pl-kos">)</span>  =&gt; <span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-en">m</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Play rust link: <a href="http://is.gd/DVjBtk" rel="nofollow">http://is.gd/DVjBtk</a></p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="macro_rules! a {(&lt;$($($d:expr),*$($c:ident),*)*&gt;) =&gt; (B&lt;$($d,)*$($c,)*&gt;);}a! (&lt;&gt;);"><pre class="notranslate"><span class="pl-k">macro_rules!</span> a <span class="pl-kos">{</span><span class="pl-kos">(</span>&lt;$<span class="pl-kos">(</span>$<span class="pl-kos">(</span>$d<span class="pl-kos">:</span>expr<span class="pl-kos">)</span>,<span class="pl-c1">*</span>$<span class="pl-kos">(</span>$c<span class="pl-kos">:</span>ident<span class="pl-kos">)</span>,<span class="pl-c1">*</span><span class="pl-kos">)</span><span class="pl-c1">*</span>&gt;<span class="pl-kos">)</span> =&gt; <span class="pl-kos">(</span><span class="pl-v">B</span>&lt;$<span class="pl-kos">(</span>$d,<span class="pl-kos">)</span><span class="pl-c1">*</span>$<span class="pl-kos">(</span>$c,<span class="pl-kos">)</span><span class="pl-c1">*</span>&gt;<span class="pl-kos">)</span><span class="pl-kos">;</span><span class="pl-kos">}</span><span class="pl-en">a</span><span class="pl-en">!</span> <span class="pl-kos">(</span>&lt;&gt;<span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>