Skip to content

Encountered error Unimplemented selecting Binder(...) during trans trying to get coverage #52478

@mbr

Description

@mbr

I have been trying out both cargo-kcov and cargo-tarpaulin and seem to keep running into the same compiler panic.

From cargo kcov on stable:

error: internal compiler error: librustc/traits/trans/mod.rs:68: Encountered error `Unimplemented` selecting `Binder(<core::char::DecodeUtf16<<std::vec::Vec<u16> as core::iter::IntoIterator>::IntoIter> as arbitrary::traits::Arbitrary>)` during trans

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554: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:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:467
   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: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::session::opt_span_bug_fmt
  13: rustc::session::bug_fmt
  14: rustc::ty::context::tls::with_related_context
  15: rustc::traits::trans::trans_fulfill_obligation
  16: rustc::ty::maps::<impl rustc::ty::maps::config::QueryConfig<'tcx> for rustc::ty::maps::queries::trans_fulfill_obligation<'tcx>>::compute
  17: rustc::dep_graph::graph::DepGraph::with_task_impl
  18: rustc::ty::context::tls::with_related_context
  19: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  20: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  21: rustc::ty::instance::Instance::resolve
  22: <rustc_mir::monomorphize::collector::RootCollector<'b, 'a, 'v> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  23: rustc::hir::Crate::visit_all_item_likes
  24: rustc_mir::monomorphize::collector::collect_crate_mono_items
  25: rustc::util::common::time
  26: rustc_trans::base::collect_and_partition_translation_items
  27: rustc::dep_graph::graph::DepGraph::with_task_impl
  28: rustc::ty::context::tls::with_related_context
  29: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  30: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  31: rustc_trans::back::symbol_export::exported_symbols_provider_local
  32: rustc::dep_graph::graph::DepGraph::with_task_impl
  33: rustc::ty::context::tls::with_related_context
  34: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  35: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  36: rustc_metadata::encoder::encode_metadata
  37: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  38: rustc::ty::context::TyCtxt::encode_metadata
  39: rustc_trans::base::write_metadata
  40: rustc::util::common::time
  41: rustc_trans::base::trans_crate
  42: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  43: rustc::util::common::time
  44: rustc_driver::driver::phase_4_translate_to_llvm
  45: rustc_driver::driver::compile_input::{{closure}}
  46: rustc::ty::context::tls::enter_context
  47: <std::thread::local::LocalKey<T>>::with
  48: rustc::ty::context::TyCtxt::create_and_enter
  49: rustc_driver::driver::compile_input
  50: rustc_driver::run_compiler_impl
  51: <scoped_tls::ScopedKey<T>>::set
  52: syntax::with_globals
  53: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  54: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  55: rustc_driver::run
  56: rustc_driver::main
  57: std::rt::lang_start::{{closure}}
  58: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  59: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  60: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:374
             at libstd/rt.rs:58
  61: main
  62: __libc_start_main
  63: <unknown>
query stack during panic:
#0 [trans_fulfill_obligation] checking if `arbitrary::traits::Arbitrary` fulfills its obligations
#1 [collect_and_partition_translation_items] collect_and_partition_translation_items
#2 [exported_symbols] exported_symbols
end of query stack
error: aborting due to previous error


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.27.1 (5f2b325f6 2018-07-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C link-dead-code --crate-type lib

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

error: Could not compile `proptest`.

Caused by:
  process didn't exit successfully: `rustc [... personal info removed ...]`

and cargo tarpaulin

error: internal compiler error: librustc/traits/trans/mod.rs:68: Encountered error `Unimplemented` selecting `Binder(<core::char::DecodeUtf16<<std::vec::Vec<u16> as core::iter::IntoIterator>::IntoIter> as arbitrary::traits::Arbitrary>)` during trans

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:554: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:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:467
   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: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::session::opt_span_bug_fmt
  13: rustc::session::bug_fmt
  14: rustc::ty::context::tls::with_related_context
  15: rustc::traits::trans::trans_fulfill_obligation
  16: rustc::ty::maps::<impl rustc::ty::maps::config::QueryConfig<'tcx> for rustc::ty::maps::queries::trans_fulfill_obligation<'tcx>>::compute
  17: rustc::dep_graph::graph::DepGraph::with_task_impl
  18: rustc::ty::context::tls::with_related_context
  19: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  20: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  21: rustc::ty::instance::Instance::resolve
  22: <rustc_mir::monomorphize::collector::RootCollector<'b, 'a, 'v> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  23: rustc::hir::Crate::visit_all_item_likes
  24: rustc_mir::monomorphize::collector::collect_crate_mono_items
  25: rustc::util::common::time
  26: rustc_trans::base::collect_and_partition_translation_items
  27: rustc::dep_graph::graph::DepGraph::with_task_impl
  28: rustc::ty::context::tls::with_related_context
  29: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  30: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  31: rustc_trans::back::symbol_export::exported_symbols_provider_local
  32: rustc::dep_graph::graph::DepGraph::with_task_impl
  33: rustc::ty::context::tls::with_related_context
  34: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  35: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  36: rustc_metadata::encoder::encode_metadata
  37: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  38: rustc::ty::context::TyCtxt::encode_metadata
  39: rustc_trans::base::write_metadata
  40: rustc::util::common::time
  41: rustc_trans::base::trans_crate
  42: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  43: rustc::util::common::time
  44: rustc_driver::driver::phase_4_translate_to_llvm
  45: rustc_driver::driver::compile_input::{{closure}}
  46: rustc::ty::context::tls::enter_context
  47: <std::thread::local::LocalKey<T>>::with
  48: rustc::ty::context::TyCtxt::create_and_enter
  49: rustc_driver::driver::compile_input
  50: rustc_driver::run_compiler_impl
  51: <scoped_tls::ScopedKey<T>>::set
  52: syntax::with_globals
  53: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  54: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  55: rustc_driver::run
  56: rustc_driver::main
  57: std::rt::lang_start::{{closure}}
  58: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  59: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  60: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:374
             at libstd/rt.rs:58
  61: main
  62: __libc_start_main
  63: <unknown>
query stack during panic:
#0 [trans_fulfill_obligation] checking if `arbitrary::traits::Arbitrary` fulfills its obligations
#1 [collect_and_partition_translation_items] collect_and_partition_translation_items
#2 [exported_symbols] exported_symbols
end of query stack
error: aborting due to previous error


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.27.1 (5f2b325f6 2018-07-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C relocation-model=dynamic-no-pic -C link-dead-code -C opt-level=0 --crate-type lib

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

Error during run

A quick search revealed similar error messages in #43924 and #40247, though those might be unrelated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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