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: ... was matchable against ... but now is not #25235

Closed
nicholasbishop opened this issue May 9, 2015 · 3 comments · Fixed by #25344
Closed

ICE: ... was matchable against ... but now is not #25235

nicholasbishop opened this issue May 9, 2015 · 3 comments · Fixed by #25344
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nicholasbishop
Copy link
Contributor

Here's the backtrace. Let me know if the code I was compiling would be helpful, I tagged the rev locally.

rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06)

$ RUST_BACKTRACE=1 cargo test   
Compiling dumbmath v0.1.6 (file:///home/nicholasbishop/dumbmath)
error: internal compiler error: Impl DefId { krate: 2, node: 26942 } was matchable against Obligation(predicate=Binder(TraitPredicate(<f32 as core::ops::Div<_>>)),depth=1) but now is not
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 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:230

stack backtrace:
   1:     0x7fbee3ae6f89 - sys::backtrace::write::h89d94970ae1bc478fhs
   2:     0x7fbee3aeef09 - panicking::on_panic::h314cddb0409059cbkXw
   3:     0x7fbee3aaf0f2 - rt::unwind::begin_unwind_inner::hd6748515f1d9c0b2uCw
   4:     0x7fbee0e85fbd - rt::unwind::begin_unwind::h9184602946677297306
   5:     0x7fbee0e8667b - diagnostic::Handler::bug::h6d48c8060c15a3b4a2B
   6:     0x7fbee1c36304 - middle::traits::select::SelectionContext<'cx, 'tcx>::rematch_impl::h10b0cc0f4e83f0c3EuT
   7:     0x7fbee1c35c2f - middle::infer::InferCtxt<'a, 'tcx>::commit_if_ok::h17325861492725920879
   8:     0x7fbee1c1c8a5 - middle::traits::select::SelectionContext<'cx, 'tcx>::confirm_candidate::hca3234a85605343cUMS
   9:     0x7fbee1afacc5 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::hec5ba022f7c648beiPQ
  10:     0x7fbee1c09d35 - middle::traits::project::project_type::h74992cfacc671364CwP
  11:     0x7fbee1c0896b - middle::traits::project::opt_normalize_projection_type::ha8866d0a50189fbcepP
  12:     0x7fbee1c0599f - middle::traits::project::project_and_unify_type::h1300a4d0fa05187d87O
  13:     0x7fbee1c03970 - middle::infer::InferCtxt<'a, 'tcx>::commit_if_ok::h107823834106425565
  14:     0x7fbee1bfb888 - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hec0877a5f2e11ad0HHO
  15:     0x7fbee1bfb29b - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h301bc31d4e510c07VGO
  16:     0x7fbee323d048 - check::vtable::select_fcx_obligations_where_possible::h72b84a124c3a5b40I6b
  17:     0x7fbee325914a - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::h74b2cbbcdf641686cPo
  18:     0x7fbee32b674e - check::op::check_binop::hba99f04615a48d79oYm
  19:     0x7fbee32ec9cd - check::check_expr_with_unifier::h12689752184703274217
  20:     0x7fbee3312c4b - check::check_decl_local::h28a2e7870f672b04j7r
  21:     0x7fbee32c23f1 - check::check_block_with_expected::h212bdec46f615ac8pds
  22:     0x7fbee32a7f36 - check::check_fn::h225bdd7ece966e55lSn
  23:     0x7fbee32bde27 - check::check_bare_fn::h8fed7360af87b5cbUHn
  24:     0x7fbee32c980c - check::check_method_body::h225a8a268d0d1168Ujo
  25:     0x7fbee32bbd85 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hb0162b7f82578cf4XEn
  26:     0x7fbee32bc1bf - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hb0162b7f82578cf4XEn
  27:     0x7fbee3376c4a - check_crate::closure.38730
  28:     0x7fbee336ff80 - check_crate::hed85a8a5c9342eb05CC
  29:     0x7fbee4035c28 - driver::phase_3_run_analysis_passes::he0b331c645c77cdbtGa
  30:     0x7fbee401705c - driver::compile_input::h763ead6090436e8fQba
  31:     0x7fbee40cfeb1 - run_compiler::h711c4a29f8d270a365b
  32:     0x7fbee40cd702 - boxed::F.FnBox<A>::call_box::h12199818508070417299
  33:     0x7fbee40cccc9 - rt::unwind::try::try_fn::h5660428370877252098
  34:     0x7fbee3b62898 - rust_try_inner
  35:     0x7fbee3b62885 - rust_try
  36:     0x7fbee40ccf64 - boxed::F.FnBox<A>::call_box::h5514408293737026672
  37:     0x7fbee3aedca1 - sys::thread::Thread::new::thread_start::hfd3ca3d51ffcfe41QIv
  38:     0x7fbeddb82529 - start_thread
  39:     0x7fbee374022c - __clone
  40:                0x0 - <unknown>

Build failed, waiting for other jobs to finish...
error: internal compiler error: Impl DefId { krate: 2, node: 26942 } was matchable against Obligation(predicate=Binder(TraitPredicate(<f32 as core::ops::Div<_>>)),depth=1) but now is not
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 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:230

stack backtrace:
   1:     0x7f920f378f89 - sys::backtrace::write::h89d94970ae1bc478fhs
   2:     0x7f920f380f09 - panicking::on_panic::h314cddb0409059cbkXw
   3:     0x7f920f3410f2 - rt::unwind::begin_unwind_inner::hd6748515f1d9c0b2uCw
   4:     0x7f920c717fbd - rt::unwind::begin_unwind::h9184602946677297306
   5:     0x7f920c71867b - diagnostic::Handler::bug::h6d48c8060c15a3b4a2B
   6:     0x7f920d4c8304 - middle::traits::select::SelectionContext<'cx, 'tcx>::rematch_impl::h10b0cc0f4e83f0c3EuT
   7:     0x7f920d4c7c2f - middle::infer::InferCtxt<'a, 'tcx>::commit_if_ok::h17325861492725920879
   8:     0x7f920d4ae8a5 - middle::traits::select::SelectionContext<'cx, 'tcx>::confirm_candidate::hca3234a85605343cUMS
   9:     0x7f920d38ccc5 - middle::traits::select::SelectionContext<'cx, 'tcx>::select::hec5ba022f7c648beiPQ
  10:     0x7f920d49bd35 - middle::traits::project::project_type::h74992cfacc671364CwP
  11:     0x7f920d49a96b - middle::traits::project::opt_normalize_projection_type::ha8866d0a50189fbcepP
  12:     0x7f920d49799f - middle::traits::project::project_and_unify_type::h1300a4d0fa05187d87O
  13:     0x7f920d495970 - middle::infer::InferCtxt<'a, 'tcx>::commit_if_ok::h107823834106425565
  14:     0x7f920d48d888 - middle::traits::fulfill::FulfillmentContext<'tcx>::select::hec0877a5f2e11ad0HHO
  15:     0x7f920d48d29b - middle::traits::fulfill::FulfillmentContext<'tcx>::select_where_possible::h301bc31d4e510c07VGO
  16:     0x7f920eacf048 - check::vtable::select_fcx_obligations_where_possible::h72b84a124c3a5b40I6b
  17:     0x7f920eaeb14a - check::FnCtxt<'a, 'tcx>::resolve_type_vars_if_possible::h74b2cbbcdf641686cPo
  18:     0x7f920eb4874e - check::op::check_binop::hba99f04615a48d79oYm
  19:     0x7f920eb7e9cd - check::check_expr_with_unifier::h12689752184703274217
  20:     0x7f920eba4c4b - check::check_decl_local::h28a2e7870f672b04j7r
  21:     0x7f920eb543f1 - check::check_block_with_expected::h212bdec46f615ac8pds
  22:     0x7f920eb39f36 - check::check_fn::h225bdd7ece966e55lSn
  23:     0x7f920eb4fe27 - check::check_bare_fn::h8fed7360af87b5cbUHn
  24:     0x7f920eb5b80c - check::check_method_body::h225a8a268d0d1168Ujo
  25:     0x7f920eb4dd85 - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hb0162b7f82578cf4XEn
  26:     0x7f920eb4e1bf - check::CheckItemBodiesVisitor<'a, 'tcx>.Visitor<'tcx>::visit_item::hb0162b7f82578cf4XEn
  27:     0x7f920ec08c4a - check_crate::closure.38730
  28:     0x7f920ec01f80 - check_crate::hed85a8a5c9342eb05CC
  29:     0x7f920f8c7c28 - driver::phase_3_run_analysis_passes::he0b331c645c77cdbtGa
  30:     0x7f920f8a905c - driver::compile_input::h763ead6090436e8fQba
  31:     0x7f920f961eb1 - run_compiler::h711c4a29f8d270a365b
  32:     0x7f920f95f702 - boxed::F.FnBox<A>::call_box::h12199818508070417299
  33:     0x7f920f95ecc9 - rt::unwind::try::try_fn::h5660428370877252098
  34:     0x7f920f3f4898 - rust_try_inner
  35:     0x7f920f3f4885 - rust_try
  36:     0x7f920f95ef64 - boxed::F.FnBox<A>::call_box::h5514408293737026672
  37:     0x7f920f37fca1 - sys::thread::Thread::new::thread_start::hfd3ca3d51ffcfe41QIv
  38:     0x7f9209414529 - start_thread
  39:     0x7f920efd222c - __clone
  40:                0x0 - <unknown>

Could not compile `dumbmath`.
@bluss
Copy link
Member

bluss commented May 9, 2015

Maybe a duplicate of #22645

Code is always useful, the best is a reduced testcase that still exhibits the problem.

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label May 10, 2015
@nicholasbishop
Copy link
Contributor Author

Here's the tag for that code: https://github.com/nicholasbishop/dumbmath-rs/tree/ice-25235

I haven't tried to reduce it to a better testcase since it looks like it's probably the same as the bug you linked to (which has a nice small test case in this comment: #22645 (comment))

@arielb1
Copy link
Contributor

arielb1 commented May 12, 2015

Seems like a duplicate of #24352 (and its duplicates #23825, #22645).

arielb1 pushed a commit to arielb1/rust that referenced this issue May 12, 2015
There is no subtyping relationship between the types (or their non-freshened
variants), so they can not be merged.

Fixes rust-lang#22645
Fixes rust-lang#24352
Fixes rust-lang#23825

Should fix rust-lang#25235 (no test in issue).
Should fix rust-lang#19976 (test is outdated).
bors added a commit that referenced this issue May 13, 2015
There is no subtyping relationship between the types (or their non-freshened
variants), so they can not be merged.

Fixes #22645
Fixes #24352
Fixes #23825

Should fix #25235 (no test in issue).
Should fix #19976 (test is outdated).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants