Skip to content

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

New issue

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

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

Already on GitHub? # to your account

Closed
mbr opened this issue Jul 18, 2018 · 11 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@mbr
Copy link

mbr commented Jul 18, 2018

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.

@mbr
Copy link
Author

mbr commented Jul 18, 2018

Minimal steps to reproduce (assuming cargo-tarpaulin is installed):

$ cargo new minimaltestcase
     Created binary (application) `minimaltestcase` project
$ cd minimaltestcase/
$ cargo add proptest
      Adding proptest v0.8.3 to dependencies
$ cargo tarpaulin
Building project
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
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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
$ rustc --version
rustc 1.27.1 (5f2b325f6 2018-07-07)
$ cargo tarpaulin  --version
cargo-tarpaulin version: 0.6.4

If I should file an issue with either cargo-tarpaulin or proptest instead, let me know.

@oli-obk oli-obk added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jul 18, 2018
@BlinkyStitt
Copy link

I was trying to use cargo-tarpaulin and proptest together and just ran into this on the latest nightly

@svenstaro
Copy link

Same observation here when using proptest and cargo-tarpaulin.

@clintfred
Copy link
Contributor

clintfred commented Dec 18, 2018

@Centril - tagging you based on a discord discussion regarding proptest.

I experienced this on
rustc 1.32.0-nightly (f4a421ee3 2018-12-13) running on x86_64-unknown-linux-gnu

while trying to use

This is while trying to build recrypt-rs

   Compiling recrypt v0.5.0 (/workspace/recrypt-rs)                                                                                  
error: internal compiler error: src/librustc/traits/codegen/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 codegen
                                                                                                                                                 
thread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:600:9                                                                           
note: Run with `RUST_BACKTRACE=1` for a backtrace.                                                                                               
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.32.0-nightly (f4a421ee3 2018-12-13) running on x86_64-unknown-linux-gnu                                                            
                                                                                                                                                 
note: compiler flags: -C opt-level=2 -C debuginfo=2 -C debug-assertions=on -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: Could not compile `proptest`. 

I can produce a full stack trace if that is helpful.

@clintfred
Copy link
Contributor

Out of curiosity, I tried cargo tarpaulin on the proptest (0.8.7) codebase, and it failed in the same way recrypt-rs was failing.
Here is a full stack trace

$ RUST_BACKTRACE=1 cargo tarpaulin
Building project
warning: unused `core::result::Result` that must be used
   --> src/test_runner/failure_persistence/file.rs:308:5
    |
308 |     write!(buf, "{}", format_basic_seed_line(seed));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: #[warn(unused_must_use)] on by default
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: internal compiler error: librustc/traits/codegen/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 codegen

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:600: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:480
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::util::bug::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::util::bug::opt_span_bug_fmt
  13: rustc::util::bug::bug_fmt
  14: rustc::ty::context::tls::with_related_context
  15: rustc::infer::InferCtxtBuilder::enter
  16: rustc::traits::codegen::codegen_fulfill_obligation
  17: rustc::ty::query::__query_compute::codegen_fulfill_obligation
  18: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::codegen_fulfill_obligation<'tcx>>::compute
  19: rustc::ty::context::tls::with_context
  20: rustc::dep_graph::graph::DepGraph::with_task_impl
  21: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start
  22: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  23: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  24: rustc::ty::instance::Instance::resolve
  25: <rustc_mir::monomorphize::collector::RootCollector<'b, 'a, 'v> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
  26: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}
  27: rustc_mir::monomorphize::collector::collect_crate_mono_items
  28: rustc::util::common::time
  29: rustc_codegen_llvm::base::collect_and_partition_mono_items
  30: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute
  31: rustc::ty::context::tls::with_context
  32: rustc::dep_graph::graph::DepGraph::with_task_impl
  33: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start
  34: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  35: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  36: rustc_codegen_llvm::back::symbol_export::exported_symbols_provider_local
  37: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::exported_symbols<'tcx>>::compute
  38: rustc::ty::context::tls::with_context
  39: rustc::dep_graph::graph::DepGraph::with_task_impl
  40: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start
  41: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  42: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  43: rustc_metadata::encoder::encode_metadata
  44: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  45: rustc::ty::context::TyCtxt::encode_metadata
  46: rustc_codegen_llvm::base::write_metadata
  47: rustc::util::common::time
  48: rustc_codegen_llvm::base::codegen_crate
  49: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  50: rustc::util::common::time
  51: rustc_driver::driver::phase_4_codegen
  52: rustc_driver::driver::compile_input::{{closure}}
  53: rustc::ty::context::tls::enter_context
  54: <std::thread::local::LocalKey<T>>::with
  55: rustc::ty::context::TyCtxt::create_and_enter
  56: rustc_driver::driver::compile_input
  57: rustc_driver::run_compiler_with_pool
  58: rustc_driver::driver::spawn_thread_pool
  59: rustc_driver::run_compiler
  60: <scoped_tls::ScopedKey<T>>::set
  61: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  62: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  63: rustc_driver::run
  64: rustc_driver::main
  65: std::rt::lang_start::{{closure}}
  66: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  67: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  68: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  69: main
  70: __libc_start_main
  71: <unknown>
query stack during panic:
#0 [codegen_fulfill_obligation] checking if `arbitrary::traits::Arbitrary` fulfills its obligations
#1 [collect_and_partition_mono_items] collect_and_partition_mono_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.31.0 (abe02cefd 2018-12-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -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

I tried cargo tarpaulin and cargo coverage on a couple other projects that use proptest, but all failed in the same way.
Does anyone have an example repo that uses proptest and can get coverage results?

@cyplo
Copy link
Contributor

cyplo commented Dec 23, 2018

I recently ported a codebase from quickcheck to proptest, it had tarpaulin before for code coverage set up and working, porting to proptest made the build fail with the same ICE as above.

@xd009642
Copy link
Contributor

Someone on my tarpaulin tracking issue for this xd009642/tarpaulin#161 mentioned it goes away if they remove -C link-dead-code from the options tarpaulin uses to build the tests. They also got results by removing that option (although that impacts the accuracy of coverage results).

@jix
Copy link
Contributor

jix commented Jan 19, 2019

For everyone ending up here trying to use proptest and tarpaulin together: the workaround I described in xd009642/tarpaulin#161 only disables dead code generation for the proptest dependency, which fails to compile with -Z link-dead-code. In my tests so far that doesn't impact the coverage accuracy of the main crate being tested. This is different from disabling dead code generation globally, which, as @xd009642 correctly points out, gives very inaccurate coverage data.

@boustrophedon
Copy link

I just encountered this trying to get code coverage set up as well. The easiest way to reproduce this is simply to clone the proptest crate directly and run RUSTFLAGS="-C link-dead-code" cargo build

@jethrogb
Copy link
Contributor

See reduced test case in #58375 (comment)

@jonas-schievink
Copy link
Contributor

Closing in favor of #58375, which has a small reproduction and is nominated for discussion

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests