<p dir="auto">The following code fails with an ICE:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)]
trait ATrait&lt;T&gt; {
    type Output;
    fn return_output() -&gt; &lt;Self as ATrait&lt;T&gt;&gt;::Output;
}"><pre class="notranslate"><span class="pl-c1">#!<span class="pl-kos">[</span>feature<span class="pl-kos">(</span>associated_types<span class="pl-kos">)</span><span class="pl-kos">]</span></span>
<span class="pl-k">trait</span> <span class="pl-smi">ATrait</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-k">type</span> <span class="pl-smi">Output</span><span class="pl-kos">;</span>
    <span class="pl-k">fn</span> <span class="pl-en">return_output</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; &lt;<span class="pl-smi">Self</span> <span class="pl-k">as</span> <span class="pl-smi">ATrait</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span>&gt;<span class="pl-kos">::</span><span class="pl-smi">Output</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">The error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="associated.rs:4:43: 4:44 error: internal compiler error: unbound path path(T)
associated.rs:4     fn return_output() -&gt; &lt;Self as ATrait&lt;T&gt;&gt;::Output;
                                                          ^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:113"><pre class="notranslate"><code class="notranslate">associated.rs:4:43: 4:44 error: internal compiler error: unbound path path(T)
associated.rs:4     fn return_output() -&gt; &lt;Self as ATrait&lt;T&gt;&gt;::Output;
                                                          ^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/diagnostic.rs:113
</code></pre></div>
<p dir="auto">The version is <code class="notranslate">rustc 0.12.0-nightly (9508faa22 2014-09-17 23:45:36 +0000)</code></p>
<p dir="auto">Code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="trait Foo&lt;T&gt; {
    type Bar;
    fn get_bar() -&gt; &lt;Self as Foo&lt;T&gt;&gt;::Bar;
}"><pre class="notranslate"><code class="notranslate">trait Foo&lt;T&gt; {
    type Bar;
    fn get_bar() -&gt; &lt;Self as Foo&lt;T&gt;&gt;::Bar;
}
</code></pre></div>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\Users\Tomaka17\Projets\test\src\main.rs:5:34: 5:35 error: internal compiler e
rror: unbound path path(T)
C:\Users\Tomaka17\Projets\test\src\main.rs:5     fn get_bar() -&gt; &lt;Self as Foo&lt;T&gt;
&gt;::Bar;
                                                                              ^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugr
eport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', C:\bot\slave\nightly-win32\build\src\libsynta
x\ast_util.rs:751"><pre class="notranslate"><code class="notranslate">C:\Users\Tomaka17\Projets\test\src\main.rs:5:34: 5:35 error: internal compiler e
rror: unbound path path(T)
C:\Users\Tomaka17\Projets\test\src\main.rs:5     fn get_bar() -&gt; &lt;Self as Foo&lt;T&gt;
&gt;::Bar;
                                                                              ^
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugr
eport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', C:\bot\slave\nightly-win32\build\src\libsynta
x\ast_util.rs:751
</code></pre></div>
<p dir="auto">(because of some issues with my shell I can't print a backtrace for now)</p>