Skip to content

ICE: NLL #55290

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

Closed
HoldMyBeer1111 opened this issue Oct 23, 2018 · 1 comment
Closed

ICE: NLL #55290

HoldMyBeer1111 opened this issue Oct 23, 2018 · 1 comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@HoldMyBeer1111
Copy link

ICE when compiling cdrs v2.0.0-beta.3

Clippy output:

    Checking cdrs v2.0.0-beta.3
thread 'main' panicked at 'assertion failed: !impl_self_ty.has_infer_types()', librustc_mir/borrow_check/nll/type_check/mod.rs:1033:21
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_mir::borrow_check::nll::type_check::TypeChecker::relate_type_and_user_type
   8: <rustc_mir::borrow_check::nll::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_constant
   9: <rustc_mir::borrow_check::nll::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_mir
  10: rustc_mir::borrow_check::nll::type_check::type_check_internal
  11: rustc::ty::context::tls::with_related_context
  12: rustc::infer::InferCtxtBuilder::enter
  13: <rustc_mir::borrow_check::nll::type_check::TypeckMir as rustc_mir::transform::MirPass>::run_pass
  14: rustc_mir::transform::mir_const::{{closure}}
  15: rustc_mir::transform::mir_const
  16: rustc::ty::query::__query_compute::mir_const
  17: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_const<'tcx>>::compute
  18: rustc::dep_graph::graph::DepGraph::with_task_impl
  19: rustc::ty::context::tls::with_related_context
  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  21: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  22: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const
  23: rustc_mir::transform::mir_validated
  24: rustc::ty::query::__query_compute::mir_validated
  25: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_validated<'tcx>>::compute
  26: rustc::dep_graph::graph::DepGraph::with_task_impl
  27: rustc::ty::context::tls::with_related_context
  28: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  29: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query
  31: rustc_borrowck::borrowck::borrowck
  32: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::borrowck<'tcx>>::compute
  33: rustc::dep_graph::graph::DepGraph::with_task_impl
  34: rustc::ty::context::tls::with_related_context
  35: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  36: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  37: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::par_body_owners
  38: rustc_borrowck::borrowck::check_crate
  39: rustc::util::common::time
  40: rustc::ty::context::tls::enter_context
  41: <std::thread::local::LocalKey<T>>::with
  42: rustc::ty::context::TyCtxt::create_and_enter
  43: rustc_driver::driver::compile_input
  44: rustc_driver::run_compiler_with_pool
  45: rustc_driver::driver::spawn_thread_pool
  46: rustc_driver::run_compiler
  47: <scoped_tls::ScopedKey<T>>::set
  48: syntax::with_globals
  49: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  50: rustc_driver::run
  51: clippy_driver::main
  52: std::rt::lang_start::{{closure}}
  53: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  54: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:102
  55: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  56: main
  57: __libc_start_main
  58: <unknown>
query stack during panic:
#0 [mir_const] processing `<cluster::config_tcp::NodeTcpConfigBuilder<'a, A>>::build`
#1 [mir_validated] processing `<cluster::config_tcp::NodeTcpConfigBuilder<'a, A>>::build`
#2 [borrowck] processing `<cluster::config_tcp::NodeTcpConfigBuilder<'a, A>>::build`
end of query stack

error: internal compiler error: unexpected panic

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

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

note: rustc 1.31.0-nightly (a66dc8a14 2018-10-22) running on x86_64-unknown-linux-gnu

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

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

error: Could not compile `cdrs`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@memoryruins memoryruins added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-NLL Area: Non-lexical lifetimes (NLL) labels Oct 23, 2018
@memoryruins
Copy link
Contributor

memoryruins commented Oct 23, 2018

Thanks for reporting!

The panic is triggered by the associated constant of a generic impl in:

impl<'a, A: Authenticator + Sized> NodeTcpConfigBuilder<'a, A> {
   const DEFAULT_MAX_SIZE: u32 = 10;
   const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30);

https://github.com/AlexPikalov/cdrs/blob/b345ffc62e781b6d993ae7c9f5b6b5631144b38a/src/cluster/config_tcp.rs#L31-L33

Closing as a duplicate of #55219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants