Skip to content

The use of associated types in type crashes even though it doesn't support type bounds at all #21017

@lifthrasiir

Description

@lifthrasiir
$ rustc -V
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)

$ cat t.rs
fn main() { struct P<A, B>; type Q<C> = P<C::A, C::B>; }

$ RUST_BACKTRACE=1 rustc t.rs
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', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore
/option.rs:330

stack backtrace:
   1:     0x7f1fbfd28850 - sys::backtrace::write::h5b05e7b061a35107Czt
   2:     0x7f1fbfd4aa60 - failure::on_fail::h1e9b7e3de59488d1aPz
   3:     0x7f1fbfcb85e0 - rt::unwind::begin_unwind_inner::h23dcfb4c37870bd62tz
   4:     0x7f1fbfcb8fb0 - rt::unwind::begin_unwind_fmt::h05159510ccba4efbzsz
   5:     0x7f1fbfd4a8b0 - rust_begin_unwind
   6:     0x7f1fbfd92440 - panicking::panic_fmt::h9b349a297a4abc9dpfl
   7:     0x7f1fbf53cc80 - astconv::ast_ty_to_ty::unboxed_closure.29245
   8:     0x7f1fbf4eff30 - astconv::ast_ty_to_ty::h459846e80e1ca4faeIs   9:     0x7f1fbf535610 - vec::Vec<T>.FromIterator<T>::from_iter::h10976503390891959296
  10:     0x7f1fbf5335a0 - astconv::convert_angle_bracketed_parameters::hf174a73ef9831607uVr
  11:     0x7f1fbf4ef920 - astconv::ast_path_substs_for_ty::h531162e4e9d843315Kr
  12:     0x7f1fbf53b200 - astconv::ast_path_to_ty::h52a70e4dd82e57a2Uhs
  13:     0x7f1fbf53cc80 - astconv::ast_ty_to_ty::unboxed_closure.29245
  14:     0x7f1fbf4eff30 - astconv::ast_ty_to_ty::h459846e80e1ca4faeIs
  15:     0x7f1fbf55c150 - collect::ty_of_item::h021eeeab1e2b5b30Nru
  16:     0x7f1fbf555180 - collect::convert::h4097b654831ed66433t
  17:     0x7f1fbf550520 - visit::walk_block::h2183693564093667231
  18:     0x7f1fbf550a50 - visit::walk_fn::h2125156231992813161
  19:     0x7f1fbf55b830 - visit::walk_item::h11697194623897409881
  20:     0x7f1fbf599800 - check_crate::unboxed_closure.30523
  21:     0x7f1fbf597670 - check_crate::hdbcb36eaa379a57c23x
  22:     0x7f1fc02779c0 - driver::phase_3_run_analysis_passes::h8c55e45fcfc1c7aegwa
  23:     0x7f1fc0260350 - driver::compile_input::h04aea004c559b910xba
  24:     0x7f1fc032ffe0 - monitor::unboxed_closure.22497
  25:     0x7f1fc032fe40 - thunk::F.Invoke<A, R>::invoke::h11849311349984608396
  26:     0x7f1fc032ebc0 - rt::unwind::try::try_fn::h13617610205470131813
  27:     0x7f1fbfdb06c0 - rust_try_inner
  28:     0x7f1fbfdb06b0 - rust_try
  29:     0x7f1fc032eeb0 - thunk::F.Invoke<A, R>::invoke::h14452289732390470265
  30:     0x7f1fbfd38910 - sys::thread::thread_start::h93b0d38960a9fcacqrw
  31:     0x7f1fba2ca0c0 - start_thread
  32:     0x7f1fbf95dec9 - __clone
  33:                0x0 - <unknown>

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