<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    x.foo(1, 2,);
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    x<span class="pl-kos">.</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:2:16: 2:17 error: unexpected token: `)`
&lt;anon&gt;:2     x.foo(1, 2,);
                        ^"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:2:16: 2:17 error: unexpected token: `)`
&lt;anon&gt;:2     x.foo(1, 2,);
                        ^
</code></pre></div>
<p dir="auto"><a href="http://is.gd/8OsLJv" rel="nofollow">http://is.gd/8OsLJv</a></p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    bar(baz,);
    foo::bar(baz,);
    foo.bar(baz,);  //~ ERROR unexpected token: `)`
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-en">bar</span><span class="pl-kos">(</span>baz<span class="pl-kos">,</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    foo<span class="pl-kos">::</span><span class="pl-en">bar</span><span class="pl-kos">(</span>baz<span class="pl-kos">,</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    foo<span class="pl-kos">.</span><span class="pl-en">bar</span><span class="pl-kos">(</span>baz<span class="pl-kos">,</span><span class="pl-kos">)</span><span class="pl-kos">;</span>  <span class="pl-c">//~ ERROR unexpected token: `)`</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It works for functions and static methods—it should also work for instance methods.</p>