Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tomjakubowski opened this issue Jan 14, 2015 · 4 comments
Closed

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

tomjakubowski opened this issue Jan 14, 2015 · 4 comments
Labels
A-associated-items Area: Associated items such as associated types and consts. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@tomjakubowski
Copy link
Contributor

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.

@tomjakubowski tomjakubowski changed the title ICE with bounded Self path in where clause of a trait ICE with bounded associated type in where clause of a trait Jan 14, 2015
@kmcallister kmcallister added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-associated-items Area: Associated items such as associated types and consts. labels Jan 14, 2015
@pnkfelix
Copy link
Member

(I think this may well be a dupe of #20220. Harder to say for #20772 , since I am not 100% sure that the test case in #20772 is well formed.)

@shepmaster
Copy link
Member

I see what seems to be related, with a bit different repro:

struct Wrapper<T>(T);
trait Thing<W = Wrapper<Self::U>> { type U; }
fn main() {}
thread 'rustc' panicked at 'no entry found for key', /Users/shep/Projects/rust/src/libcore/option.rs:330

stack backtrace:
   1:        0x112b78003 - sys::backtrace::write::ha0f424154546b7c40nC
   2:        0x112ba6005 - panicking::on_panic::h3b5dbc92e5fd084enPL
   3:        0x112acf838 - rt::unwind::begin_unwind_inner::h37e4198786058d62AwL
   4:        0x112ad004e - rt::unwind::begin_unwind_fmt::h82fc55bfa0e33b196uL
   5:        0x112ba5ade - rust_begin_unwind
   6:        0x112bf7ca7 - panicking::panic_fmt::h781a4eae67125670cSv
   7:        0x10f4c87dd - astconv::ast_ty_to_ty::closure.34581
   8:        0x10f460cab - astconv::ast_ty_to_ty::hfe9ef7dae67bf45dNcw
   9:        0x10f4bca2d - astconv::ast_ty_arg_to_ty::hd688f06078a4948asbw
  10:        0x10f4bc5d0 - vec::Vec<T>.FromIterator<T>::from_iter::h17676191886426164953
  11:        0x10f4b98c0 - astconv::convert_angle_bracketed_parameters::h4086c3680493bbb0biv
  12:        0x10f4602bf - astconv::ast_path_substs_for_ty::h3b3263700c531214G0u
  13:        0x10f4c3317 - astconv::ast_path_to_ty::h4e66c6cbfa9be1cfqKv
  14:        0x10f4c7d48 - astconv::ast_ty_to_ty::closure.34581
  15:        0x10f460cab - astconv::ast_ty_to_ty::hfe9ef7dae67bf45dNcw
  16:        0x10f4f18d2 - collect::ty_generics::hf5d450d36371d407EGy
  17:        0x10f4cf767 - collect::trait_def_of_item::h7572f38569b82ba4Q2x
  18:        0x10f4ce1ef - collect::CollectTraitDefVisitor<'a, 'tcx>.visit..Visitor<'v>::visit_item::hf820b3250e32a099S8w
  19:        0x10f51a65f - check_crate::closure.35775
  20:        0x10f51860e - check_crate::h583bc81808bd2320VjC
  21:        0x10ee88e2b - driver::phase_3_run_analysis_passes::h507eee96de6c00b5gHa
  22:        0x10ee6e0ed - driver::compile_input::h7a8da1baf9f8a9c6Gba
  23:        0x10ef46bf7 - run_compiler::h179d8ac424d7e401Zbc
  24:        0x10ef44071 - thunk::F.Invoke<A, R>::invoke::h16471643475163732258
  25:        0x10ef42cd0 - rt::unwind::try::try_fn::h1724851838442748004
  26:        0x112c22509 - rust_try_inner
  27:        0x112c224f6 - rust_try
  28:        0x10ef43435 - thunk::F.Invoke<A, R>::invoke::h1291584261435236911
  29:        0x112b8eee3 - sys::thread::thread_start::h3887c6efdcfe71b9U4G
  30:     0x7fff83ba1268 - _pthread_body

rustc 1.0.0-dev (2b01a37ec 2015-02-21) (built 2015-02-21)

@tamird
Copy link
Contributor

tamird commented Apr 22, 2015

Triage: @shepmaster's example still ICEs.

@arielb1
Copy link
Contributor

arielb1 commented Jul 7, 2015

duplicate of #26812.

@arielb1 arielb1 added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jul 7, 2015
@bors bors closed this as completed in 7954096 Jul 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items such as associated types and consts. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

6 participants