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 on with rustc 1.26.0-nightly (f5631d9ac 2018-03-24) and later #49556

Closed
shisoft opened this issue Apr 1, 2018 · 10 comments · Fixed by #49730
Closed

ICE on with rustc 1.26.0-nightly (f5631d9ac 2018-03-24) and later #49556

shisoft opened this issue Apr 1, 2018 · 10 comments · Fixed by #49730
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@shisoft
Copy link

shisoft commented Apr 1, 2018

I got ICE for sometime and also searched in issues but cannot find a relative one.
Sorry for not able to produce the minimal cases to pin down the actual failing case in my code base by simply reverting my code. x

This issue does not exists in nightly-2018-03-21. Error message as follows:

error: internal compiler error: librustc/infer/error_reporting/mod.rs:184: impossible case reached

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
stack backtrace:
error: internal compiler error: librustc/infer/error_reporting/mod.rs:184: impossible case reached

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
stack backtrace:
   0:     0x7fa7c8f7ef4b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h88d4b1300e862de6
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fa7c8f4ca00 - std::sys_common::backtrace::print::ha4b25ea03535b6bc
                               at libstd/sys_common/backtrace.rs:71
                               at libstd/sys_common/backtrace.rs:59
   2:     0x7fa7c8f7242d - std::panicking::default_hook::{{closure}}::h89f6c65d34e612c1
                               at libstd/panicking.rs:207
   3:     0x7fa7c8f72185 - std::panicking::default_hook::h97a3d20007e3cd68
                               at libstd/panicking.rs:223
   4:     0x7fa7c55a80bd - core::ops::function::Fn::call::h21c5f1174484de1a
   5:     0x7fa7c8f72979 - std::panicking::rust_panic_with_hook::h47bfd51197e881f4
                               at libstd/panicking.rs:403
   6:     0x7fa7c3fbf269 - std::panicking::begin_panic::he66ba5a4f20558a9
   7:     0x7fa7c3fd94a1 - rustc_errors::Handler::bug::hd2b47daace8879c7
   8:     0x7fa7c5698abf - rustc::session::opt_span_bug_fmt::{{closure}}::h7a285e675f7ecad3
   9:     0x7fa7c56ace35 - rustc::ty::context::tls::with_opt::{{closure}}::hb0c60bbc299dec38
  10:     0x7fa7c5649643 - <std::thread::local::LocalKey<T>>::try_with::h0a97f593c5dcf1c7
  11:     0x7fa7c5640466 - <std::thread::local::LocalKey<T>>::with::h726e9ee6cbe6f2db
  12:     0x7fa7c545f46d - rustc::ty::context::tls::with::hc95b50ac92e9f143
  13:     0x7fa7c545f9d7 - rustc::ty::context::tls::with_opt::ha16a77063b42a873
  14:     0x7fa7c57da6f4 - rustc::session::opt_span_bug_fmt::h85e42a1462a7acb2
  15:     0x7fa7c57da666 - rustc::session::bug_fmt::h9e6b1e77a7b65211
  16:     0x7fa7c53c7ed3 - rustc::infer::error_reporting::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::msg_span_from_free_region::he2ac2a4633d5dfff
  17:     0x7fa7c52775d7 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_region::hd2f22229a00c57c3
  18:     0x7fa7c56b291e - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  19:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  20:     0x7fa7c5596284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  21:     0x7fa7c56a1969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  22:     0x7fa7c56b277f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  23:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  24:     0x7fa7c559a6ec - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h8377cf69a3c2c1f0
  25:     0x7fa7c569ec69 - rustc::ty::fold::TypeFoldable::fold_with::h2dc9610f10be1f49
  26:     0x7fa7c56b28dd - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  27:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  28:     0x7fa7c5242e56 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::h3a462fd54cf08b8d
  29:     0x7fa7c5598c13 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h61f2f9442aee3a46
  30:     0x7fa7c57f82b0 - <T as rustc::ty::context::InternIteratorElement<T, R>>::intern_with::hddaaaf54af2f5922
  31:     0x7fa7c5277828 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  32:     0x7fa7c5596284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  33:     0x7fa7c56a1969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  34:     0x7fa7c56b277f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  35:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  36:     0x7fa7c5596284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  37:     0x7fa7c56a1969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  38:     0x7fa7c56b277f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  39:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  40:     0x7fa7c5596284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  41:     0x7fa7c56a1969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  42:     0x7fa7c56b277f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  43:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  44:     0x7fa7c5596284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  45:     0x7fa7c56a1969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  46:     0x7fa7c56b277f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  47:     0x7fa7c5277876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  48:     0x7fa7c52be464 - rustc::infer::anon_types::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::infer_anon_definition_from_instantiation::h4382306e1f859274
  49:     0x7fa7c772a322 - rustc_typeck::check::writeback::WritebackCx::visit_anon_types::hb5eb94c81332802f
  50:     0x7fa7c76c20a7 - rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body::h340dbe93fe6a6d61
  51:     0x7fa7c7767726 - rustc::ty::context::tls::enter::ha8ae9527661ca966
  52:     0x7fa7c7739560 - rustc::infer::InferCtxtBuilder::enter::h384a6cfe140c0e55
  53:     0x7fa7c76d8441 - rustc_typeck::check::typeck_tables_of::h045a25f5cc18b4e1
  54:     0x7fa7c517929a - rustc::dep_graph::graph::DepGraph::with_task_impl::h38209dd06e555259
  55:     0x7fa7c5131009 - rustc_errors::Handler::track_diagnostics::hb92a0cb7ed53a4fb
  56:     0x7fa7c5401657 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h4e245e41f290c214
  57:     0x7fa7c54b3d3e - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force::h577074b5c2a71819
  58:     0x7fa7c54b45e2 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get::h663470b06f1a9af4
  59:     0x7fa7c535165a - rustc::ty::maps::TyCtxtAt::typeck_tables_of::hef9e3f61ef0afd39
  60:     0x7fa7c54b3c31 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure::h7a7f7d4e96880ddf
  61:     0x7fa7c782e5bd - rustc::session::Session::track_errors::h16333b127c93c6e4
  62:     0x7fa7c76d7fba - rustc_typeck::check::typeck_item_bodies::hf17344a5285ef991
  63:     0x7fa7c51a438b - rustc::dep_graph::graph::DepGraph::with_task_impl::hd12fc88c46806a2c
  64:     0x7fa7c5122306 - rustc_errors::Handler::track_diagnostics::h816b34bde43fe45f
  65:     0x7fa7c5419377 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h8c005ba7475fc1fb
  66:     0x7fa7c54b2a9c - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force::h97a52420d1392948
  67:     0x7fa7c54b32af - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get::h53db8e36934be5c4
  68:     0x7fa7c5351575 - rustc::ty::maps::TyCtxtAt::typeck_item_bodies::h0ff25c11fabef17e
  69:     0x7fa7c547138e - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies::he8b170ee0ad4618c
  70:     0x7fa7c78535c2 - rustc_typeck::check_crate::h9abc42612774df7a
  71:     0x7fa7c9386fc2 - <std::thread::local::LocalKey<T>>::with::hff6cfdad62c33763
  72:     0x7fa7c9386886 - <std::thread::local::LocalKey<T>>::with::hf73e2e411d5e1bbd
  73:     0x7fa7c93f95cb - rustc::ty::context::TyCtxt::create_and_enter::h4882ed8ffc6c0dcf
  74:     0x7fa7c92f6166 - rustc_driver::driver::compile_input::h976478050b890adf
  75:     0x7fa7c93adc36 - rustc_driver::run_compiler_impl::h1d61215e89cf59af
  76:     0x7fa7c92f3205 - syntax::with_globals::h5f781b83399af32f
  77:     0x7fa7c932609d - std::sys_common::backtrace::__rust_begin_short_backtrace::h3d7c503aecc53ac6
  78:     0x7fa7c8f8d06e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  79:     0x7fa7c93340f6 - <F as alloc::boxed::FnBox<A>>::call_box::h5cb8e83b4182087c
  80:     0x7fa7c8f841e7 - std::sys_common::thread::start_thread::hf4cb05e0f65cf12c
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
  81:     0x7fa7c8f52f98 - std::sys::unix::thread::Thread::new::thread_start::h7f0887f31dcc98be
                               at libstd/sys/unix/thread.rs:90
  82:     0x7fa7c32fb7fb - start_thread
  83:     0x7fa7c8c29b5e - clone
  84:                0x0 - <unknown>
   0:     0x7faca05ecf4b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h88d4b1300e862de6
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7faca05baa00 - std::sys_common::backtrace::print::ha4b25ea03535b6bc
                               at libstd/sys_common/backtrace.rs:71
                               at libstd/sys_common/backtrace.rs:59
   2:     0x7faca05e042d - std::panicking::default_hook::{{closure}}::h89f6c65d34e612c1
                               at libstd/panicking.rs:207
   3:     0x7faca05e0185 - std::panicking::default_hook::h97a3d20007e3cd68
                               at libstd/panicking.rs:223
   4:     0x7fac9cc160bd - core::ops::function::Fn::call::h21c5f1174484de1a
   5:     0x7faca05e0979 - std::panicking::rust_panic_with_hook::h47bfd51197e881f4
                               at libstd/panicking.rs:403
   6:     0x7fac9b62d269 - std::panicking::begin_panic::he66ba5a4f20558a9
   7:     0x7fac9b6474a1 - rustc_errors::Handler::bug::hd2b47daace8879c7
   8:     0x7fac9cd06abf - rustc::session::opt_span_bug_fmt::{{closure}}::h7a285e675f7ecad3
   9:     0x7fac9cd1ae35 - rustc::ty::context::tls::with_opt::{{closure}}::hb0c60bbc299dec38
  10:     0x7fac9ccb7643 - <std::thread::local::LocalKey<T>>::try_with::h0a97f593c5dcf1c7
  11:     0x7fac9ccae466 - <std::thread::local::LocalKey<T>>::with::h726e9ee6cbe6f2db
  12:     0x7fac9cacd46d - rustc::ty::context::tls::with::hc95b50ac92e9f143
  13:     0x7fac9cacd9d7 - rustc::ty::context::tls::with_opt::ha16a77063b42a873
  14:     0x7fac9ce486f4 - rustc::session::opt_span_bug_fmt::h85e42a1462a7acb2
  15:     0x7fac9ce48666 - rustc::session::bug_fmt::h9e6b1e77a7b65211
  16:     0x7fac9ca35ed3 - rustc::infer::error_reporting::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::msg_span_from_free_region::he2ac2a4633d5dfff
  17:     0x7fac9c8e55d7 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_region::hd2f22229a00c57c3
  18:     0x7fac9cd2091e - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  19:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  20:     0x7fac9cc04284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  21:     0x7fac9cd0f969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  22:     0x7fac9cd2077f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  23:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  24:     0x7fac9cc086ec - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h8377cf69a3c2c1f0
  25:     0x7fac9cd0cc69 - rustc::ty::fold::TypeFoldable::fold_with::h2dc9610f10be1f49
  26:     0x7fac9cd208dd - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  27:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  28:     0x7fac9c8b0e56 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::h3a462fd54cf08b8d
  29:     0x7fac9cc06c13 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h61f2f9442aee3a46
  30:     0x7fac9ce662b0 - <T as rustc::ty::context::InternIteratorElement<T, R>>::intern_with::hddaaaf54af2f5922
  31:     0x7fac9c8e5828 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  32:     0x7fac9cc04284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  33:     0x7fac9cd0f969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  34:     0x7fac9cd2077f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  35:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  36:     0x7fac9cc04284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  37:     0x7fac9cd0f969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  38:     0x7fac9cd2077f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  39:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  40:     0x7fac9cc04284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  41:     0x7fac9cd0f969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  42:     0x7fac9cd2077f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  43:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  44:     0x7fac9cc04284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  45:     0x7fac9cd0f969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  46:     0x7fac9cd2077f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  47:     0x7fac9c8e5876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  48:     0x7fac9c92c464 - rustc::infer::anon_types::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::infer_anon_definition_from_instantiation::h4382306e1f859274
  49:     0x7fac9ed98322 - rustc_typeck::check::writeback::WritebackCx::visit_anon_types::hb5eb94c81332802f
  50:     0x7fac9ed300a7 - rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body::h340dbe93fe6a6d61
  51:     0x7fac9edd5726 - rustc::ty::context::tls::enter::ha8ae9527661ca966
  52:     0x7fac9eda7560 - rustc::infer::InferCtxtBuilder::enter::h384a6cfe140c0e55
  53:     0x7fac9ed46441 - rustc_typeck::check::typeck_tables_of::h045a25f5cc18b4e1
  54:     0x7fac9c7e729a - rustc::dep_graph::graph::DepGraph::with_task_impl::h38209dd06e555259
  55:     0x7fac9c79f009 - rustc_errors::Handler::track_diagnostics::hb92a0cb7ed53a4fb
  56:     0x7fac9ca6f657 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h4e245e41f290c214
  57:     0x7fac9cb21d3e - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force::h577074b5c2a71819
  58:     0x7fac9cb225e2 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get::h663470b06f1a9af4
  59:     0x7fac9c9bf65a - rustc::ty::maps::TyCtxtAt::typeck_tables_of::hef9e3f61ef0afd39
  60:     0x7fac9cb21c31 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure::h7a7f7d4e96880ddf
  61:     0x7fac9ee9c5bd - rustc::session::Session::track_errors::h16333b127c93c6e4
  62:     0x7fac9ed45fba - rustc_typeck::check::typeck_item_bodies::hf17344a5285ef991
  63:     0x7fac9c81238b - rustc::dep_graph::graph::DepGraph::with_task_impl::hd12fc88c46806a2c
  64:     0x7fac9c790306 - rustc_errors::Handler::track_diagnostics::h816b34bde43fe45f
  65:     0x7fac9ca87377 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h8c005ba7475fc1fb
  66:     0x7fac9cb20a9c - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force::h97a52420d1392948
  67:     0x7fac9cb212af - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get::h53db8e36934be5c4
  68:     0x7fac9c9bf575 - rustc::ty::maps::TyCtxtAt::typeck_item_bodies::h0ff25c11fabef17e
  69:     0x7fac9cadf38e - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies::he8b170ee0ad4618c
  70:     0x7fac9eec15c2 - rustc_typeck::check_crate::h9abc42612774df7a
  71:     0x7faca09f4fc2 - <std::thread::local::LocalKey<T>>::with::hff6cfdad62c33763
  72:     0x7faca09f4886 - <std::thread::local::LocalKey<T>>::with::hf73e2e411d5e1bbd
  73:     0x7faca0a675cb - rustc::ty::context::TyCtxt::create_and_enter::h4882ed8ffc6c0dcf
  74:     0x7faca0964166 - rustc_driver::driver::compile_input::h976478050b890adf
  75:     0x7faca0a1bc36 - rustc_driver::run_compiler_impl::h1d61215e89cf59af
  76:     0x7faca0961205 - syntax::with_globals::h5f781b83399af32f
  77:     0x7faca099409d - std::sys_common::backtrace::__rust_begin_short_backtrace::h3d7c503aecc53ac6
  78:     0x7faca05fb06e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  79:     0x7faca09a20f6 - <F as alloc::boxed::FnBox<A>>::call_box::h5cb8e83b4182087c
  80:     0x7faca05f21e7 - std::sys_common::thread::start_thread::hf4cb05e0f65cf12c
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
  81:     0x7faca05c0f98 - std::sys::unix::thread::Thread::new::thread_start::h7f0887f31dcc98be
                               at libstd/sys/unix/thread.rs:90
  82:     0x7fac9a9697fb - start_thread
  83:     0x7faca0297b5e - clone
  84:                0x0 - <unknown>

meta for 2018-03-21

rustc 1.26.0-nightly (75af15ee6 2018-03-20)
binary: rustc
commit-hash: 75af15ee6ca0c12b699a17984b033363cd25e9c3
commit-date: 2018-03-20
host: x86_64-unknown-linux-gnu
release: 1.26.0-nightly
LLVM version: 6.0

meta for 2018-03-24

rustc 1.26.0-nightly (c08480fce 2018-03-23)
binary: rustc
commit-hash: c08480fce0f39f5c9c6db6dde0dccb375ca0ab14
commit-date: 2018-03-23
host: x86_64-unknown-linux-gnu
release: 1.26.0-nightly
LLVM version: 6.0

I appreciate any hints and suggestions on helping me to reproduce this issue into minimal case but right now I just can't find out what changes in my code caused this problem. My code base is https://github.com/ShisoftResearch/Hivemind/tree/kylo

@shisoft
Copy link
Author

shisoft commented Apr 1, 2018

I have dig into this and found the snippet of code caused this problem: https://github.com/ShisoftResearch/Hivemind/blob/6618ae71c74ebb21f834c68b661b5fca898f8804/src/context/mod.rs#L53

It should produce an error which did not appeared in previous build

error[E0283]: type annotations required: cannot resolve `_: serde::Serialize`
  --> src/context/mod.rs:54:13
   |
54 |             DataSet::from_block_storage(
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: required by `<resource::DataSet<T>>::from_block_storage`
  --> src/resource/mod.rs:63:5
   |
63 | /     pub fn from_block_storage(
64 | |         manager: &Arc<BlockManager>,
65 | |         server_id: u64,
66 | |         task: UUID,
...  |
75 | |             }))
76 | |     }
   | |_____^

This is not the whole story, when I assign DataSet::from_block_storage to a variable and return the variable, it got the same ICE but the type inference error gone.

I finally able to mitigate the problem by turning the return type from impl Future to Box<Future<?, ?>>

@pietroalbini pietroalbini added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 5, 2018
@sinkuu
Copy link
Contributor

sinkuu commented Apr 5, 2018

I got a possibly same ICE with this code: https://gist.github.com/sinkuu/7d9e6dcf6397546866f367b281562c30

Meta:

rustc 1.27.0-nightly (fb44b4c0e 2018-04-04)
binary: rustc
commit-hash: fb44b4c0eb1d344f84f7bb2c90f28e31a8a180be
commit-date: 2018-04-04
host: x86_64-unknown-linux-gnu
release: 1.27.0-nightly
LLVM version: 6.0

Backtrace:

error: internal compiler error: librustc/infer/error_reporting/mod.rs:184: impossible case reached

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:207
   3: std::panicking::default_hook
             at libstd/panicking.rs:223
   4: core::ops::function::Fn::call
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:403
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::session::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: <std::thread::local::LocalKey<T>>::try_with
  11: <std::thread::local::LocalKey<T>>::with
  12: rustc::ty::context::tls::with
  13: rustc::ty::context::tls::with_opt
  14: rustc::session::opt_span_bug_fmt
  15: rustc::session::bug_fmt
  16: rustc::infer::error_reporting::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::msg_span_from_free_region
  17: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_region
  18: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  19: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  20: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  21: rustc::ty::fold::TypeFoldable::fold_with
  22: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  23: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  24: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  25: rustc::ty::fold::TypeFoldable::fold_with
  26: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  27: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  28: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once
  29: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  30: <T as rustc::ty::context::InternIteratorElement<T, R>>::intern_with
  31: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  32: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  33: rustc::ty::fold::TypeFoldable::fold_with
  34: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  35: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  36: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  37: rustc::ty::fold::TypeFoldable::fold_with
  38: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  39: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  40: <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter
  41: rustc::ty::fold::TypeFoldable::fold_with
  42: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  43: <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  44: rustc::infer::anon_types::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::infer_anon_definition_from_instantiation
  45: rustc_typeck::check::writeback::WritebackCx::visit_anon_types
  46: rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body
  47: rustc::ty::context::tls::enter
  48: rustc::infer::InferCtxtBuilder::enter
  49: rustc_typeck::check::typeck_tables_of
  50: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  51: rustc::dep_graph::graph::DepGraph::with_task_impl
  52: rustc_errors::Handler::track_diagnostics
  53: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  54: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  55: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  56: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  57: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure
  58: rustc::session::Session::track_errors
  59: rustc_typeck::check::typeck_item_bodies
  60: rustc::dep_graph::graph::DepGraph::with_task_impl
  61: rustc_errors::Handler::track_diagnostics
  62: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  63: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force
  64: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  65: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  66: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  67: rustc_typeck::check_crate
  68: <std::thread::local::LocalKey<T>>::with
  69: <std::thread::local::LocalKey<T>>::with
  70: rustc::ty::context::TyCtxt::create_and_enter
  71: rustc_driver::driver::compile_input
  72: rustc_driver::run_compiler_impl
  73: syntax::with_globals
  74: rustc_driver::run
  75: rustc_driver::main
  76: std::rt::lang_start::{{closure}}
  77: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:306
  78: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  79: std::rt::lang_start_internal
             at libstd/panicking.rs:285
             at libstd/panic.rs:361
             at libstd/rt.rs:58
  80: main
  81: __libc_start_main
  82: <unknown>

@mchesser
Copy link

mchesser commented Apr 6, 2018

This gives me the same ICE:

fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
    data.iter().map(|x| x).map(|x| *x)
}

However this does not ICE:

fn iter<'a>(data: &'a [usize]) -> impl Iterator<Item = usize> + 'a {
    data.iter().map(|x| *x).map(|x| x)
}

@sinkuu
Copy link
Contributor

sinkuu commented Apr 6, 2018

data.iter().map(|x| x).map(|x| *x)

The closure in .map(|x| x) is (&'a u32) -> &'(ReScope) u32, therefore tcx.note_and_explain_free_region causes ICE.

data.iter().map(|x| *x).map(|x| x)

(&'a u32) -> u32 and (u32) -> u32, so all is fine.

@shisoft
Copy link
Author

shisoft commented Apr 7, 2018

Hi all. #49730 does not fix my issue.

error: internal compiler error: librustc/infer/error_reporting/mod.rs:184: impossible case reached

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
stack backtrace:
error: internal compiler error: librustc/infer/error_reporting/mod.rs:184: impossible case reached

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
stack backtrace:
   0:     0x7f6793e60f4b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h88d4b1300e862de6
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f6793e2ea00 - std::sys_common::backtrace::print::ha4b25ea03535b6bc
                               at libstd/sys_common/backtrace.rs:71
                               at libstd/sys_common/backtrace.rs:59
   2:     0x7f6793e5442d - std::panicking::default_hook::{{closure}}::h89f6c65d34e612c1
                               at libstd/panicking.rs:207
   3:     0x7f6793e54185 - std::panicking::default_hook::h97a3d20007e3cd68
                               at libstd/panicking.rs:223
   4:     0x7f679048a0bd - core::ops::function::Fn::call::h21c5f1174484de1a
   5:     0x7f6793e54979 - std::panicking::rust_panic_with_hook::h47bfd51197e881f4
                               at libstd/panicking.rs:403
   6:     0x7f678eea1269 - std::panicking::begin_panic::he66ba5a4f20558a9
   7:     0x7f678eebb4a1 - rustc_errors::Handler::bug::hd2b47daace8879c7
   8:     0x7f679057aabf - rustc::session::opt_span_bug_fmt::{{closure}}::h7a285e675f7ecad3
   9:     0x7f679058ee35 - rustc::ty::context::tls::with_opt::{{closure}}::hb0c60bbc299dec38
  10:     0x7f679052b643 - <std::thread::local::LocalKey<T>>::try_with::h0a97f593c5dcf1c7
  11:     0x7f6790522466 - <std::thread::local::LocalKey<T>>::with::h726e9ee6cbe6f2db
  12:     0x7f679034146d - rustc::ty::context::tls::with::hc95b50ac92e9f143
  13:     0x7f67903419d7 - rustc::ty::context::tls::with_opt::ha16a77063b42a873
  14:     0x7f67906bc6f4 - rustc::session::opt_span_bug_fmt::h85e42a1462a7acb2
  15:     0x7f67906bc666 - rustc::session::bug_fmt::h9e6b1e77a7b65211
  16:     0x7f67902a9ed3 - rustc::infer::error_reporting::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::msg_span_from_free_region::he2ac2a4633d5dfff
  17:     0x7f67901595d7 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_region::hd2f22229a00c57c3
  18:     0x7f679059491e - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  19:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  20:     0x7f6790478284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  21:     0x7f6790583969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  22:     0x7f679059477f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  23:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  24:     0x7f679047c6ec - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h8377cf69a3c2c1f0
  25:     0x7f6790580c69 - rustc::ty::fold::TypeFoldable::fold_with::h2dc9610f10be1f49
  26:     0x7f67905948dd - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  27:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  28:     0x7f6790124e56 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::h3a462fd54cf08b8d
  29:     0x7f679047ac13 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h61f2f9442aee3a46
  30:     0x7f67906da2b0 - <T as rustc::ty::context::InternIteratorElement<T, R>>::intern_with::hddaaaf54af2f5922
  31:     0x7f6790159828 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  32:     0x7f6790478284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  33:     0x7f6790583969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  34:     0x7f679059477f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  35:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  36:     0x7f6790478284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  37:     0x7f6790583969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  38:     0x7f679059477f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  39:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  40:     0x7f6790478284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  41:     0x7f6790583969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  42:     0x7f679059477f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  43:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  44:     0x7f6790478284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  45:     0x7f6790583969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  46:     0x7f679059477f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  47:     0x7f6790159876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  48:     0x7f67901a0464 - rustc::infer::anon_types::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::infer_anon_definition_from_instantiation::h4382306e1f859274
  49:     0x7f679260c322 - rustc_typeck::check::writeback::WritebackCx::visit_anon_types::hb5eb94c81332802f
  50:     0x7f67925a40a7 - rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body::h340dbe93fe6a6d61
  51:     0x7f6792649726 - rustc::ty::context::tls::enter::ha8ae9527661ca966
  52:     0x7f679261b560 - rustc::infer::InferCtxtBuilder::enter::h384a6cfe140c0e55
  53:     0x7f67925ba441 - rustc_typeck::check::typeck_tables_of::h045a25f5cc18b4e1
  54:     0x7f679005b29a - rustc::dep_graph::graph::DepGraph::with_task_impl::h38209dd06e555259
  55:     0x7f6790013009 - rustc_errors::Handler::track_diagnostics::hb92a0cb7ed53a4fb
  56:     0x7f67902e3657 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h4e245e41f290c214
  57:     0x7f6790395d3e - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force::h577074b5c2a71819
  58:     0x7f67903965e2 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get::h663470b06f1a9af4
  59:     0x7f679023365a - rustc::ty::maps::TyCtxtAt::typeck_tables_of::hef9e3f61ef0afd39
  60:     0x7f6790395c31 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure::h7a7f7d4e96880ddf
  61:     0x7f67927105bd - rustc::session::Session::track_errors::h16333b127c93c6e4
  62:     0x7f67925b9fba - rustc_typeck::check::typeck_item_bodies::hf17344a5285ef991
  63:     0x7f679008638b - rustc::dep_graph::graph::DepGraph::with_task_impl::hd12fc88c46806a2c
  64:     0x7f6790004306 - rustc_errors::Handler::track_diagnostics::h816b34bde43fe45f
  65:     0x7f67902fb377 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h8c005ba7475fc1fb
  66:     0x7f6790394a9c - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force::h97a52420d1392948
  67:     0x7f67903952af - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get::h53db8e36934be5c4
  68:     0x7f6790233575 - rustc::ty::maps::TyCtxtAt::typeck_item_bodies::h0ff25c11fabef17e
  69:     0x7f679035338e - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies::he8b170ee0ad4618c
  70:     0x7f67927355c2 - rustc_typeck::check_crate::h9abc42612774df7a
  71:     0x7f6794268fc2 - <std::thread::local::LocalKey<T>>::with::hff6cfdad62c33763
  72:     0x7f6794268886 - <std::thread::local::LocalKey<T>>::with::hf73e2e411d5e1bbd
  73:     0x7f67942db5cb - rustc::ty::context::TyCtxt::create_and_enter::h4882ed8ffc6c0dcf
  74:     0x7f67941d8166 - rustc_driver::driver::compile_input::h976478050b890adf
  75:     0x7f679428fc36 - rustc_driver::run_compiler_impl::h1d61215e89cf59af
  76:     0x7f67941d5205 - syntax::with_globals::h5f781b83399af32f
  77:     0x7f679420809d - std::sys_common::backtrace::__rust_begin_short_backtrace::h3d7c503aecc53ac6
  78:     0x7f6793e6f06e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  79:     0x7f67942160f6 - <F as alloc::boxed::FnBox<A>>::call_box::h5cb8e83b4182087c
  80:     0x7f6793e661e7 - std::sys_common::thread::start_thread::hf4cb05e0f65cf12c
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
  81:     0x7f6793e34f98 - std::sys::unix::thread::Thread::new::thread_start::h7f0887f31dcc98be
                               at libstd/sys/unix/thread.rs:90
  82:     0x7f678e1dd7fb - start_thread
  83:     0x7f6793b0bb5e - clone
  84:                0x0 - <unknown>
   0:     0x7f6f458c5f4b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h88d4b1300e862de6
                               at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f6f45893a00 - std::sys_common::backtrace::print::ha4b25ea03535b6bc
                               at libstd/sys_common/backtrace.rs:71
                               at libstd/sys_common/backtrace.rs:59
   2:     0x7f6f458b942d - std::panicking::default_hook::{{closure}}::h89f6c65d34e612c1
                               at libstd/panicking.rs:207
   3:     0x7f6f458b9185 - std::panicking::default_hook::h97a3d20007e3cd68
                               at libstd/panicking.rs:223
   4:     0x7f6f41eef0bd - core::ops::function::Fn::call::h21c5f1174484de1a
   5:     0x7f6f458b9979 - std::panicking::rust_panic_with_hook::h47bfd51197e881f4
                               at libstd/panicking.rs:403
   6:     0x7f6f40906269 - std::panicking::begin_panic::he66ba5a4f20558a9
   7:     0x7f6f409204a1 - rustc_errors::Handler::bug::hd2b47daace8879c7
   8:     0x7f6f41fdfabf - rustc::session::opt_span_bug_fmt::{{closure}}::h7a285e675f7ecad3
   9:     0x7f6f41ff3e35 - rustc::ty::context::tls::with_opt::{{closure}}::hb0c60bbc299dec38
  10:     0x7f6f41f90643 - <std::thread::local::LocalKey<T>>::try_with::h0a97f593c5dcf1c7
  11:     0x7f6f41f87466 - <std::thread::local::LocalKey<T>>::with::h726e9ee6cbe6f2db
  12:     0x7f6f41da646d - rustc::ty::context::tls::with::hc95b50ac92e9f143
  13:     0x7f6f41da69d7 - rustc::ty::context::tls::with_opt::ha16a77063b42a873
  14:     0x7f6f421216f4 - rustc::session::opt_span_bug_fmt::h85e42a1462a7acb2
  15:     0x7f6f42121666 - rustc::session::bug_fmt::h9e6b1e77a7b65211
  16:     0x7f6f41d0eed3 - rustc::infer::error_reporting::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::msg_span_from_free_region::he2ac2a4633d5dfff
  17:     0x7f6f41bbe5d7 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_region::hd2f22229a00c57c3
  18:     0x7f6f41ff991e - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  19:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  20:     0x7f6f41edd284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  21:     0x7f6f41fe8969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  22:     0x7f6f41ff977f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  23:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  24:     0x7f6f41ee16ec - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h8377cf69a3c2c1f0
  25:     0x7f6f41fe5c69 - rustc::ty::fold::TypeFoldable::fold_with::h2dc9610f10be1f49
  26:     0x7f6f41ff98dd - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  27:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  28:     0x7f6f41b89e56 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &'a mut F>::call_once::h3a462fd54cf08b8d
  29:     0x7f6f41edfc13 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h61f2f9442aee3a46
  30:     0x7f6f4213f2b0 - <T as rustc::ty::context::InternIteratorElement<T, R>>::intern_with::hddaaaf54af2f5922
  31:     0x7f6f41bbe828 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  32:     0x7f6f41edd284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  33:     0x7f6f41fe8969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  34:     0x7f6f41ff977f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  35:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  36:     0x7f6f41edd284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  37:     0x7f6f41fe8969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  38:     0x7f6f41ff977f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  39:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  40:     0x7f6f41edd284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  41:     0x7f6f41fe8969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  42:     0x7f6f41ff977f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  43:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  44:     0x7f6f41edd284 - <rustc_data_structures::accumulate_vec::AccumulateVec<A> as core::iter::traits::FromIterator<<A as rustc_data_structures::array_vec::Array>::Element>>::from_iter::h123b1b0451a30840
  45:     0x7f6f41fe8969 - rustc::ty::fold::TypeFoldable::fold_with::hadc69145d18b9346
  46:     0x7f6f41ff977f - rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with::hef9c449b0c4daaae
  47:     0x7f6f41bbe876 - <rustc::infer::anon_types::ReverseMapper<'cx, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty::h5c8b9267b7259e21
  48:     0x7f6f41c05464 - rustc::infer::anon_types::<impl rustc::infer::InferCtxt<'a, 'gcx, 'tcx>>::infer_anon_definition_from_instantiation::h4382306e1f859274
  49:     0x7f6f44071322 - rustc_typeck::check::writeback::WritebackCx::visit_anon_types::hb5eb94c81332802f
  50:     0x7f6f440090a7 - rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body::h340dbe93fe6a6d61
  51:     0x7f6f440ae726 - rustc::ty::context::tls::enter::ha8ae9527661ca966
  52:     0x7f6f44080560 - rustc::infer::InferCtxtBuilder::enter::h384a6cfe140c0e55
  53:     0x7f6f4401f441 - rustc_typeck::check::typeck_tables_of::h045a25f5cc18b4e1
  54:     0x7f6f41ac029a - rustc::dep_graph::graph::DepGraph::with_task_impl::h38209dd06e555259
  55:     0x7f6f41a78009 - rustc_errors::Handler::track_diagnostics::hb92a0cb7ed53a4fb
  56:     0x7f6f41d48657 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h4e245e41f290c214
  57:     0x7f6f41dfad3e - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force::h577074b5c2a71819
  58:     0x7f6f41dfb5e2 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get::h663470b06f1a9af4
  59:     0x7f6f41c9865a - rustc::ty::maps::TyCtxtAt::typeck_tables_of::hef9e3f61ef0afd39
  60:     0x7f6f41dfac31 - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::ensure::h7a7f7d4e96880ddf
  61:     0x7f6f441755bd - rustc::session::Session::track_errors::h16333b127c93c6e4
  62:     0x7f6f4401efba - rustc_typeck::check::typeck_item_bodies::hf17344a5285ef991
  63:     0x7f6f41aeb38b - rustc::dep_graph::graph::DepGraph::with_task_impl::hd12fc88c46806a2c
  64:     0x7f6f41a69306 - rustc_errors::Handler::track_diagnostics::h816b34bde43fe45f
  65:     0x7f6f41d60377 - rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check::h8c005ba7475fc1fb
  66:     0x7f6f41df9a9c - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::force::h97a52420d1392948
  67:     0x7f6f41dfa2af - rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get::h53db8e36934be5c4
  68:     0x7f6f41c98575 - rustc::ty::maps::TyCtxtAt::typeck_item_bodies::h0ff25c11fabef17e
  69:     0x7f6f41db838e - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies::he8b170ee0ad4618c
  70:     0x7f6f4419a5c2 - rustc_typeck::check_crate::h9abc42612774df7a
  71:     0x7f6f45ccdfc2 - <std::thread::local::LocalKey<T>>::with::hff6cfdad62c33763
  72:     0x7f6f45ccd886 - <std::thread::local::LocalKey<T>>::with::hf73e2e411d5e1bbd
  73:     0x7f6f45d405cb - rustc::ty::context::TyCtxt::create_and_enter::h4882ed8ffc6c0dcf
  74:     0x7f6f45c3d166 - rustc_driver::driver::compile_input::h976478050b890adf
  75:     0x7f6f45cf4c36 - rustc_driver::run_compiler_impl::h1d61215e89cf59af
  76:     0x7f6f45c3a205 - syntax::with_globals::h5f781b83399af32f
  77:     0x7f6f45c6d09d - std::sys_common::backtrace::__rust_begin_short_backtrace::h3d7c503aecc53ac6
  78:     0x7f6f458d406e - __rust_maybe_catch_panic
                               at libpanic_unwind/lib.rs:102
  79:     0x7f6f45c7b0f6 - <F as alloc::boxed::FnBox<A>>::call_box::h5cb8e83b4182087c
  80:     0x7f6f458cb1e7 - std::sys_common::thread::start_thread::hf4cb05e0f65cf12c
                               at /checkout/src/liballoc/boxed.rs:793
                               at libstd/sys_common/thread.rs:24
  81:     0x7f6f45899f98 - std::sys::unix::thread::Thread::new::thread_start::h7f0887f31dcc98be
                               at libstd/sys/unix/thread.rs:90
  82:     0x7f6f3fc427fb - start_thread
  83:     0x7f6f45570b5e - clone
  84:                0x0 - <unknown>

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: rustc 1.26.0-nightly (c08480fce 2018-03-23) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `hivemind`.
warning: build failed, waiting for other jobs to finish...

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: rustc 1.26.0-nightly (c08480fce 2018-03-23) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

@sinkuu
Copy link
Contributor

sinkuu commented Apr 7, 2018

@shisoft Sorry, I forgot to test with your case. Though you seem to be using a nightly-2018-03-23 which can never contain unmerged #49730, right? https://github.com/ShisoftResearch/Hivemind/tree/kylo depends on proc-macro2-1.1 which is not even compilable with recent nightlies.

@shisoft
Copy link
Author

shisoft commented Apr 11, 2018

Hi, sorry for the slow reply. I will try that again once the branch have been merged. Any ETA on when it will go into nightly? Thanks

@sinkuu
Copy link
Contributor

sinkuu commented Apr 11, 2018

Any ETA on when it will go into nightly?

No, it varies due to approval of other PRs. Here is the current queue: https://buildbot2.rust-lang.org/homu/queue/rust

kennytm added a commit to kennytm/rust that referenced this issue Apr 11, 2018
Fix ICE with impl Trait

Fixes rust-lang#49556 (comment). May or may not fix 49556 itself. Closures like `|x: &'a _| x` has `ClosureSubsts` of `fn(&'a _) -> &'(ReScope) _`, so `tcx.note_and_explain_free_region` (called [here](https://github.com/rust-lang/rust/blob/a143462783cec88b7b733e8aa09990bfeb59f754/src/librustc/infer/anon_types/mod.rs#L572)) panics.
@sinkuu
Copy link
Contributor

sinkuu commented Apr 15, 2018

Nightly 2018-04-14 contains #49730. Could you reopen if the problem persists?

@pentlander
Copy link

As at least one data point, I had the same issue and it was resolved with 2018-04-15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants