<p dir="auto">Repeatable case: <a href="http://is.gd/kcejxG" rel="nofollow">http://is.gd/kcejxG</a></p>
<p dir="auto">% uname -a<br>
Darwin pair 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64</p>
<p dir="auto">% rustc --version --verbose<br>
rustc 1.0.0-dev (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a45e117733b866302fa99390553d1c548508dcca/hovercard" href="https://github.com/rust-lang/rust/commit/a45e117733b866302fa99390553d1c548508dcca"><tt>a45e117</tt></a> 2015-01-28 11:01:36 +0000)<br>
binary: rustc<br>
commit-hash: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/a45e117733b866302fa99390553d1c548508dcca/hovercard" href="https://github.com/rust-lang/rust/commit/a45e117733b866302fa99390553d1c548508dcca"><tt>a45e117</tt></a><br>
commit-date: 2015-01-28 11:01:36 +0000<br>
host: x86_64-apple-darwin<br>
release: 1.0.0-dev</p>
<p dir="auto">% RUST_BACKTRACE=1 make<br>
...<br>
[ 96%] Making lib crate rs_cmset with /usr/local/bin/rustc<br>
error: internal compiler error: unexpected panic<br>
note: the compiler unexpectedly panicked. this is a bug.<br>
note: we would appreciate a bug report: <a href="http://doc.rust-lang.org/complement-bugreport.html" rel="nofollow">http://doc.rust-lang.org/complement-bugreport.html</a><br>
note: run with <code class="notranslate">RUST_BACKTRACE=1</code> for a backtrace<br>
thread 'rustc' panicked at 'assertion failed: did.krate != ast::LOCAL_CRATE', /Users/swizard/distr/rust/src/librustc/middle/ty.rs:5369</p>
<p dir="auto">stack backtrace:<br>
1:        0x1060db7a7 - sys::backtrace::write::ha7c2a314980a2c9fvbu<br>
2:        0x106101c5c - failure::on_fail::h6e454f5b61899a9aqbB<br>
3:        0x106063068 - rt::unwind::begin_unwind_inner::h197e2c88eee2bed0mTA<br>
4:        0x1030d9f6c - rt::unwind::begin_unwind::h15446879943960288925<br>
5:        0x10345a400 - middle::ty::lookup_trait_def::h88c5bce57aa634a31O7<br>
6:        0x10349cb77 - middle::ty::predicates_for_trait_ref::h459855321b274b287P7<br>
7:        0x103475438 - middle::traits::util::Elaborator&lt;'cx, 'tcx&gt;.Iterator::next::h670ac496f66d05c4wyT<br>
8:        0x10347b4e4 - middle::traits::util::Supertraits&lt;'cx, 'tcx&gt;.Iterator::next::ha6665f6ae93509757AT<br>
9:        0x102da1b98 - astconv::ast_ty_to_ty::closure.30847<br>
10:        0x102d39f10 - astconv::ast_ty_to_ty::h791f4e70b868f1e66jt<br>
11:        0x102d98239 - vec::Vec.FromIterator::from_iter::h17536640115762312557<br>
12:        0x102d95d5d - astconv::convert_angle_bracketed_parameters::h8a8cf081a61eaf4c7ss<br>
13:        0x102d99f92 - astconv::ast_path_to_trait_ref::h76759fc1ebf0bbe4yFs<br>
14:        0x102d467fb - astconv::instantiate_trait_ref::hce19a4879401779bfCs<br>
15:        0x102d9931a - astconv::instantiate_poly_trait_ref::h56d2fa5170cae6f6XAs<br>
16:        0x102dc9ae3 - collect::compute_bounds::h1a901096fd069158CDv<br>
17:        0x102db110b - collect::trait_def_of_item::hc3bcbaea1d0acb87U1u<br>
18:        0x102daf8ef - collect::CollectTraitDefVisitor&lt;'a, 'tcx&gt;.visit..Visitor&lt;'v&gt;::visit_item::h31c230bdcdecd31bneu<br>
19:        0x102dafb1f - collect::CollectTraitDefVisitor&lt;'a, 'tcx&gt;.visit..Visitor&lt;'v&gt;::visit_item::h31c230bdcdecd31bneu<br>
20:        0x102def55f - check_crate::closure.31984<br>
21:        0x102ded4d5 - check_crate::haecc3fe6465ec7b6ZNy<br>
22:        0x1027be8eb - driver::phase_3_run_analysis_passes::h79664d81b6b5b4e4NFa<br>
23:        0x1027a4e5c - driver::compile_input::hec1fc484fb82a3b3Bba<br>
24:        0x10286d50e - run_compiler::hc5f9e0285db79a55n9b<br>
25:        0x10286a62f - thunk::F.Invoke&lt;A, R&gt;::invoke::h4736678281155978274<br>
26:        0x1028692c0 - rt::unwind::try::try_fn::h3346791736825056138<br>
27:        0x10617aa09 - rust_try_inner<br>
28:        0x10617a9f6 - rust_try<br>
29:        0x102869984 - thunk::F.Invoke&lt;A, R&gt;::invoke::h14937575134341006880<br>
30:        0x1060ec313 - sys:<g-emoji class="g-emoji" alias="thread" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f9f5.png">🧵</g-emoji>:thread_start::hd065b218eff37dc2J3w<br>
31:     0x7fff87bec268 - _pthread_body<br>
32:     0x7fff87bec1e5 - _pthread_body</p>
<p dir="auto">It actually happens even if you take out the <code class="notranslate">type T</code> but I figured that would be too confusing of a testcase.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#![feature(associated_types)]

pub trait Foo {
    type T;
    type S: Bar&lt;Self::T&gt;;
}

pub trait Bar&lt;T&gt; {}"><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">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-k">type</span> <span class="pl-smi">T</span><span class="pl-kos">;</span>
    <span class="pl-k">type</span> <span class="pl-smi">S</span><span class="pl-kos">:</span> <span class="pl-smi">Bar</span><span class="pl-kos">&lt;</span><span class="pl-smi">Self</span><span class="pl-kos">::</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Bar</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-kos">}</span></pre></div>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'no entry found for key', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libcore/option.rs:329

stack backtrace:
   1:        0x1078c7c38 - sys::backtrace::write::h329291c3ffa2342c0Jt
   2:        0x1078e8a03 - failure::on_fail::h17e4ace9633d727be0z
   3:        0x107854c3a - rt::unwind::begin_unwind_inner::h190be063817ae06eFHz
   4:        0x10785915d - rt::unwind::begin_unwind_fmt::hc68ebd2b3de4118e2Ez
   5:        0x1078e8302 - rust_begin_unwind
   6:        0x107935d0c - panicking::panic_fmt::h6d9a452b0d084e9dLkl
   7:        0x1046960b9 - collections::hash::map::HashMap&lt;K,$u{20}V$C$$u{20}H$GT$.Index$LT$Q$C$$u{20}V$GT$::index::h4548773097338651390
   8:        0x104756a96 - astconv::ast_ty_to_ty::unboxed_closure.36753
   9:        0x104755323 - astconv::ast_ty_to_ty::h3464216238889989760
  10:        0x10475497c - iter::IteratorExt::collect::h1178474147849539242
  11:        0x104862cf1 - astconv::ast_path_to_trait_ref::h12290017992957141453
  12:        0x1048625e6 - astconv::instantiate_poly_trait_ref::h3434886886043991751
  13:        0x104862350 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h6759705047736047902
  14:        0x1048c987d - collect::compute_bounds::h9074989142750734463
  15:        0x104860e9b - collect::ty_generics_for_trait::ha23d00f7844cb7b4quv
  16:        0x1047321ee - collect::trait_def_of_item::h2e00c54b47ce1f2cgdv
  17:        0x10472ed30 - collect::CollectTraitDefVisitor&lt;$u{27}a$C$$u{20}$u{27}tcx$GT$.visit..Visitor$LT$$u{27}v$GT$::visit_item::h913166666a1bcfc7dSt
  18:        0x10492237f - check_crate::unboxed_closure.43401
  19:        0x10492048a - check_crate::hcab218417b8f1f7f51y
  20:        0x103ff9113 - driver::phase_3_run_analysis_passes::hb0ac12e829cd00e7Jta
  21:        0x103fdaffe - driver::compile_input::hdcb29128a43ec322wba
  22:        0x10417aff8 - thunk::Thunk&lt;(*,$u{20}R$GT$::new::unboxed_closure.30336
  23:        0x104179038 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h12480167585331118411
  24:        0x1041777d9 - rt::unwind::try::try_fn::h9666833473335668351
  25:        0x107950669 - rust_try_inner
  26:        0x107950656 - rust_try
  27:        0x104177ed7 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h4838524648863172491
  28:        0x1078d7c24 - sys::thread::thread_start::h7394d69fbc5b85e9vFw
  29:     0x7fff8115e899 - _pthread_body
  30:     0x7fff8115e72a - _pthread_struct_init"><pre class="notranslate"><span class="pl-c1">error: internal compiler error: unexpected panic</span>
<span class="pl-c1">note: the compiler unexpectedly panicked. this is a bug.</span>
<span class="pl-c1">note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html</span>
<span class="pl-c1">note: run with `RUST_BACKTRACE=1` for a backtrace</span>
<span class="pl-c1">thread 'rustc' panicked at 'no entry found for key', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libcore/option.rs:329</span>

<span class="pl-c1">stack backtrace:</span>
<span class="pl-c1">   1:        0x1078c7c38 - sys::backtrace::write::h329291c3ffa2342c0Jt</span>
<span class="pl-c1">   2:        0x1078e8a03 - failure::on_fail::h17e4ace9633d727be0z</span>
<span class="pl-c1">   3:        0x107854c3a - rt::unwind::begin_unwind_inner::h190be063817ae06eFHz</span>
<span class="pl-c1">   4:        0x10785915d - rt::unwind::begin_unwind_fmt::hc68ebd2b3de4118e2Ez</span>
<span class="pl-c1">   5:        0x1078e8302 - rust_begin_unwind</span>
<span class="pl-c1">   6:        0x107935d0c - panicking::panic_fmt::h6d9a452b0d084e9dLkl</span>
<span class="pl-c1">   7:        0x1046960b9 - collections::hash::map::HashMap&lt;K,$u{20}V$C$$u{20}H$GT$.Index$LT$Q$C$$u{20}V$GT$::index::h4548773097338651390</span>
<span class="pl-c1">   8:        0x104756a96 - astconv::ast_ty_to_ty::unboxed_closure.36753</span>
<span class="pl-c1">   9:        0x104755323 - astconv::ast_ty_to_ty::h3464216238889989760</span>
<span class="pl-c1">  10:        0x10475497c - iter::IteratorExt::collect::h1178474147849539242</span>
<span class="pl-c1">  11:        0x104862cf1 - astconv::ast_path_to_trait_ref::h12290017992957141453</span>
<span class="pl-c1">  12:        0x1048625e6 - astconv::instantiate_poly_trait_ref::h3434886886043991751</span>
<span class="pl-c1">  13:        0x104862350 - vec::Vec&lt;T&gt;.FromIterator&lt;T&gt;::from_iter::h6759705047736047902</span>
<span class="pl-c1">  14:        0x1048c987d - collect::compute_bounds::h9074989142750734463</span>
<span class="pl-c1">  15:        0x104860e9b - collect::ty_generics_for_trait::ha23d00f7844cb7b4quv</span>
<span class="pl-c1">  16:        0x1047321ee - collect::trait_def_of_item::h2e00c54b47ce1f2cgdv</span>
<span class="pl-c1">  17:        0x10472ed30 - collect::CollectTraitDefVisitor&lt;$u{27}a$C$$u{20}$u{27}tcx$GT$.visit..Visitor$LT$$u{27}v$GT$::visit_item::h913166666a1bcfc7dSt</span>
<span class="pl-c1">  18:        0x10492237f - check_crate::unboxed_closure.43401</span>
<span class="pl-c1">  19:        0x10492048a - check_crate::hcab218417b8f1f7f51y</span>
<span class="pl-c1">  20:        0x103ff9113 - driver::phase_3_run_analysis_passes::hb0ac12e829cd00e7Jta</span>
<span class="pl-c1">  21:        0x103fdaffe - driver::compile_input::hdcb29128a43ec322wba</span>
<span class="pl-c1">  22:        0x10417aff8 - thunk::Thunk&lt;(*,$u{20}R$GT$::new::unboxed_closure.30336</span>
<span class="pl-c1">  23:        0x104179038 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h12480167585331118411</span>
<span class="pl-c1">  24:        0x1041777d9 - rt::unwind::try::try_fn::h9666833473335668351</span>
<span class="pl-c1">  25:        0x107950669 - rust_try_inner</span>
<span class="pl-c1">  26:        0x107950656 - rust_try</span>
<span class="pl-c1">  27:        0x104177ed7 - thunk::F.Invoke&lt;A,$u{20}R$GT$::invoke::h4838524648863172491</span>
<span class="pl-c1">  28:        0x1078d7c24 - sys::thread::thread_start::h7394d69fbc5b85e9vFw</span>
<span class="pl-c1">  29:     0x7fff8115e899 - _pthread_body</span>
<span class="pl-c1">  30:     0x7fff8115e72a - _pthread_struct_init</span></pre></div>