<p dir="auto">The following piece of code contains a redundant <code class="notranslate">mut</code>, but triggers no warning:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let mut a;
    a = 13;
    println!(&quot;{}&quot;, a);
}"><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-k">let</span> <span class="pl-k">mut</span> a<span class="pl-kos">;</span>
    a = <span class="pl-c1">13</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, a<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">If you have two methods in an impl block, each containing an enum (with the same name), each containing at least one value with the same name, rustc gives the same LLVM symbol for the two of them and fails, as it does not include the method name in the symbol name.</p>
<p dir="auto">Minimal test case:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub struct Foo;
impl Foo {
    pub fn foo() {
        enum Panic { Common };
    }
    pub fn bar() {
        enum Panic { Common };
    }
}
fn main() {
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos">;</span>
<span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">enum</span> <span class="pl-smi">Panic</span> <span class="pl-kos">{</span> <span class="pl-v">Common</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">enum</span> <span class="pl-smi">Panic</span> <span class="pl-kos">{</span> <span class="pl-v">Common</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>
<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-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: internal compiler error: duplicate LLVM symbol: _ZN14__extensions__5Panic6Common7descrim17_32f9788ad4163dc87_0$x2e0E
rust: task failed at 'explicit failure', /home/chris/vc/rust/src/libsyntax/diagnostic.rs:95
rust: task failed at 'explicit failure', /home/chris/vc/rust/src/librustc/rustc.rs:355
rust: domain main @0x19ffd90 root task failed
leaked memory in rust main loop (1 objects)
rustc: /home/chris/vc/rust/src/rt/memory_region.cpp:192: memory_region::~memory_region(): Assertion `false' failed."><pre class="notranslate"><code class="notranslate">error: internal compiler error: duplicate LLVM symbol: _ZN14__extensions__5Panic6Common7descrim17_32f9788ad4163dc87_0$x2e0E
rust: task failed at 'explicit failure', /home/chris/vc/rust/src/libsyntax/diagnostic.rs:95
rust: task failed at 'explicit failure', /home/chris/vc/rust/src/librustc/rustc.rs:355
rust: domain main @0x19ffd90 root task failed
leaked memory in rust main loop (1 objects)
rustc: /home/chris/vc/rust/src/rt/memory_region.cpp:192: memory_region::~memory_region(): Assertion `false' failed.
</code></pre></div>