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 - Generic Specialization With Default Associated Type #36149

Closed
randomPoison opened this issue Aug 30, 2016 · 2 comments
Closed

ICE - Generic Specialization With Default Associated Type #36149

randomPoison opened this issue Aug 30, 2016 · 2 comments

Comments

@randomPoison
Copy link
Contributor

Having a trait Foo with associated type Bar and function foo() and a generic default implementation using default keyword for Bar and foo() yields an ICE.

See the following playground for a minimal example: https://is.gd/FIf4Jc

ICE backtrace:

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:326
stack backtrace:
   1:     0x7fd75228b629 - std::sys::backtrace::tracing::imp::write::h482d45d91246faa2
   2:     0x7fd75229bd1c - std::panicking::default_hook::_{{closure}}::h89158f66286b674e
   3:     0x7fd75229a027 - std::panicking::default_hook::h9e30d428ee3b0c43
   4:     0x7fd75229a838 - std::panicking::rust_panic_with_hook::h2224f33fb7bf2f4c
   5:     0x7fd75229a6d2 - std::panicking::begin_panic::hcb11a4dc6d779ae5
   6:     0x7fd75229a600 - std::panicking::begin_panic_fmt::h310416c62f3935b3
   7:     0x7fd75229a581 - rust_begin_unwind
   8:     0x7fd752305aef - core::panicking::panic_fmt::hc5789f4e80194729
   9:     0x7fd752305a1b - core::panicking::panic::h1953378f4b37b561
  10:     0x7fd75097bf3c - rustc_typeck::check::compare_method::compare_impl_method::_{{closure}}::h08bef90d287aed42
  11:     0x7fd7508d8099 - rustc_typeck::check::compare_method::compare_impl_method::he3538453c2efe177
  12:     0x7fd7508ecde2 - rustc_typeck::check::check_impl_items_against_trait::hb105ca8bb42a0b3d
  13:     0x7fd7508ea5a2 - rustc_typeck::check::check_item_type::hba3733559d49be1e
  14:     0x7fd7508e2deb - _<rustc_typeck..check..CheckItemTypesVisitor<'a, 'tcx> as rustc..hir..intravisit..Visitor<'tcx>>::visit_item::h369cacffbaa18923
  15:     0x7fd7508e4ceb - rustc_typeck::check::check_item_types::h81e44a5d40f450fd
  16:     0x7fd75095c323 - rustc_typeck::check_crate::h8ec8b2f490f5dc28
  17:     0x7fd75267ab03 - rustc_driver::driver::phase_3_run_analysis_passes::_{{closure}}::h45e03cee16dcf298
  18:     0x7fd752647546 - rustc_driver::driver::phase_3_run_analysis_passes::hc0de40cea97d81a1
  19:     0x7fd752633f02 - rustc_driver::driver::compile_input::hd9ecc57abd3cba85
  20:     0x7fd752666756 - rustc_driver::run_compiler::h184264500271cc39
  21:     0x7fd7525ac8c2 - std::panicking::try::do_call::h17a7a17ad7240c5c
  22:     0x7fd7522aa086 - __rust_maybe_catch_panic
  23:     0x7fd7525c626a - _<F as alloc..boxed..FnBox<A>>::call_box::h93f9128277b2964a
  24:     0x7fd7522983f2 - std::sys::thread::Thread::new::thread_start::he0bf102845911132
  25:     0x7fd74a5ad6f9 - start_thread
  26:     0x7fd751edbb5c - clone
  27:                0x0 - <unknown>

I'm running this on the playground on the nightly setting so I can't find the exact rustc version being run.

@durka
Copy link
Contributor

durka commented Aug 30, 2016

duplicate of #35869

@randomPoison
Copy link
Contributor Author

Ah, sorry about that! I didn't recognize that it was the same error. Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants