Skip to content

ICE with bounded associated type in where clause of a trait #21140

Closed
@tomjakubowski

Description

@tomjakubowski

rustc 1.0.0-dev (3614e1de6 2015-01-14 04:42:01 +0000)

pub trait Trait where Self::Out: std::fmt::Show {
    type Out;
}
thread 'rustc' panicked at 'no entry found for key', /home/tom/src/rust/rust/src/libcore/option.rs:330

stack backtrace:
   1:     0x7f4c3e42ca80 - sys::backtrace::write::ha0aae27c13f1e1e2wRt
   2:     0x7f4c3e44e460 - failure::on_fail::h6467179db076ae40d5z
   3:     0x7f4c3e3bd510 - rt::unwind::begin_unwind_inner::h60ee3cb21c325c186Jz
   4:     0x7f4c3e3be040 - rt::unwind::begin_unwind_fmt::h374483fb441173d8DIz
   5:     0x7f4c3e44e2c0 - rust_begin_unwind
   6:     0x7f4c3e49fb80 - panicking::panic_fmt::h61e6123d33617eebvym
   7:     0x7f4c3dc60570 - astconv::ast_ty_to_ty::unboxed_closure.29412
   8:     0x7f4c3dc12b10 - astconv::ast_ty_to_ty::h1763fcd7e8e2744azSs
   9:     0x7f4c3dc8c960 - collect::ty_generics::he250f27d9578b0d23Vu
  10:     0x7f4c3dc73ac0 - collect::trait_def_of_item::h6774115495711e070wu
  11:     0x7f4c3dc71690 - collect::CollectTraitDefVisitor<'a, 'tcx>.visit..Visitor<'v>::visit_item::he26bc84d696b35decKt
  12:     0x7f4c3dcbc0b0 - check_crate::unboxed_closure.30645
  13:     0x7f4c3dcba0f0 - check_crate::h022f16fd72b6c09dney
  14:     0x7f4c3e986c70 - driver::phase_3_run_analysis_passes::h0ee4fa5e73acbe9cEEa
  15:     0x7f4c3e974a50 - driver::compile_input::hc689346ac2e9c62fAba
  16:     0x7f4c3ea36310 - run_compiler::he89321e2dd531b37e5b
  17:     0x7f4c3ea34a80 - thunk::F.Invoke<A, R>::invoke::h16839135703482139551
  18:     0x7f4c3ea339e0 - rt::unwind::try::try_fn::h363853857083200694
  19:     0x7f4c3e4be130 - rust_try_inner
  20:     0x7f4c3e4be120 - rust_try
  21:     0x7f4c3ea33c90 - thunk::F.Invoke<A, R>::invoke::h16782837970792084443
  22:     0x7f4c3e43c100 - sys::thread::thread_start::h5480a52fb17d8858jJw
  23:     0x7f4c38b73250 - start_thread
  24:     0x7f4c3e06d219 - clone
  25:                0x0 - <unknown>

Thought this might be a dupe of #20220 #20772 but I don't think so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions