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: 'assertion failed: !impl_self_ty.has_infer_types()' on 2018-10-19 and newer #55332

Closed
thenewwazoo opened this issue Oct 24, 2018 · 1 comment

Comments

@thenewwazoo
Copy link

Building https://github.com/thenewwazoo/stm32l0x1-hal commit 338d77b051ce on 2018-10-19 or newer (tested up to today) fails with the following ICE:

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
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
   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::ty::context::tls::with_context
  19: rustc::dep_graph::graph::DepGraph::with_task_impl
  20: rustc::ty::context::tls::with_related_context
  21: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  22: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  23: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const
  24: rustc_mir::transform::mir_validated
  25: rustc::ty::query::__query_compute::mir_validated
  26: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_validated<'tcx>>::compute
  27: rustc::ty::context::tls::with_context
  28: rustc::dep_graph::graph::DepGraph::with_task_impl
  29: rustc::ty::context::tls::with_related_context
  30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  31: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  32: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_validated
  33: rustc_mir::borrow_check::mir_borrowck
  34: rustc::ty::query::__query_compute::mir_borrowck
  35: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_borrowck<'tcx>>::compute
  36: rustc::ty::context::tls::with_context
  37: rustc::ty::context::tls::with_context
  38: rustc::dep_graph::graph::DepGraph::with_task_impl
  39: rustc::ty::context::tls::with_related_context
  40: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  41: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  42: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck
  43: rustc_mir::borrow_check::nll::type_check::TypeChecker::check_stmt
  44: rustc_mir::borrow_check::nll::type_check::TypeChecker::typeck_mir
  45: rustc_mir::borrow_check::nll::type_check::type_check_internal
  46: rustc::ty::context::tls::with_related_context
  47: rustc::infer::InferCtxtBuilder::enter
  48: <rustc_mir::borrow_check::nll::type_check::TypeckMir as rustc_mir::transform::MirPass>::run_pass
  49: rustc_mir::transform::mir_const::{{closure}}
  50: rustc_mir::transform::mir_const
  51: rustc::ty::query::__query_compute::mir_const
  52: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_const<'tcx>>::compute
  53: rustc::ty::context::tls::with_context
  54: rustc::dep_graph::graph::DepGraph::with_task_impl
  55: rustc::ty::context::tls::with_related_context
  56: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  57: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  58: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const
  59: rustc_mir::transform::mir_validated
  60: rustc::ty::query::__query_compute::mir_validated
  61: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_validated<'tcx>>::compute
  62: rustc::ty::context::tls::with_context
  63: rustc::dep_graph::graph::DepGraph::with_task_impl
  64: rustc::ty::context::tls::with_related_context
  65: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  66: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  67: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query
  68: rustc_borrowck::borrowck::borrowck
  69: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::borrowck<'tcx>>::compute
  70: rustc::ty::context::tls::with_context
  71: rustc::dep_graph::graph::DepGraph::with_task_impl
  72: rustc::ty::context::tls::with_related_context
  73: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  74: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  75: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::par_body_owners
  76: rustc_borrowck::borrowck::check_crate
  77: rustc::util::common::time
  78: rustc::ty::context::tls::enter_context
  79: <std::thread::local::LocalKey<T>>::with
  80: rustc::ty::context::TyCtxt::create_and_enter
  81: rustc_driver::driver::compile_input
  82: rustc_driver::run_compiler_with_pool
  83: rustc_driver::driver::spawn_thread_pool
  84: rustc_driver::run_compiler
  85: <scoped_tls::ScopedKey<T>>::set
  86: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  87: __rust_maybe_catch_panic
  88: rustc_driver::run
  89: rustc_driver::main
  90: std::rt::lang_start::{{closure}}
  91: std::panicking::try::do_call
  92: __rust_maybe_catch_panic
  93: std::rt::lang_start_internal
  94: main
query stack during panic:
#0 [mir_const] processing `<gpio::PA0<MODE>>::into_analog::{{closure}}`
#1 [mir_validated] processing `<gpio::PA0<MODE>>::into_analog::{{closure}}`
#2 [mir_borrowck] processing `<gpio::PA0<MODE>>::into_analog::{{closure}}`
#3 [mir_const] processing `<gpio::PA0<MODE>>::into_analog`
#4 [mir_validated] processing `<gpio::PA0<MODE>>::into_analog`
#5 [borrowck] processing `<gpio::PA0<MODE>>::into_analog`
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 (78ff609d7 2018-10-19) running on x86_64-apple-darwin

note: compiler flags: -Z linker-flavor=ld -C debuginfo=2 -C incremental -C link-arg=-Tlink.x -C linker=arm-none-eabi-ld --crate-type lib

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

error: Could not compile `stm32l0x1-hal`.
@thenewwazoo
Copy link
Author

This is a dupe of #55337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant