Skip to content

ICE: Failed to extract DefId: opt_local_def_id_to_hir_id after renaming a struct #116023

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

Open
xzihnago opened this issue Sep 21, 2023 · 2 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@xzihnago
Copy link

The problem occurs when compiling after renaming a struct.

The first compilation succeeds, but any subsequent changes to the struct name result in errors.

It is necessary to clean the target and recompile in order to pass.

Code

#[shuttle_runtime::main]
async fn shuttle_main() -> Result<OtherArbitraryRenaming, shuttle_runtime::Error> {
    Ok(OtherArbitraryRenaming {})
}

// Customize this struct with things from `shuttle_main` needed in `bind`,
// such as secrets or database connections
struct OtherArbitraryRenaming {}

#[shuttle_runtime::async_trait]
impl shuttle_runtime::Service for OtherArbitraryRenaming {
    async fn bind(self, _addr: std::net::SocketAddr) -> Result<(), shuttle_runtime::Error> {
        // Start your service and bind to the socket address
        Ok(())
    }
}

Meta

rustc --version --verbose:

rustc 1.72.0 (5680fa18f 2023-08-23)
binary: rustc
commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be
commit-date: 2023-08-23
host: x86_64-pc-windows-msvc
release: 1.72.0
LLVM version: 16.0.5

with dependencies
shuttle-runtime = "0.26.0"
tokio = "1"

Error output

thread 'rustc' panicked at 'Failed to extract DefId: opt_local_def_id_to_hir_id 125eac7a212f5b05-e622b4e51539e7c8', compiler\rustc_middle\src\dep_graph\dep_node.rs:181:17
Backtrace

thread 'rustc' panicked at 'Failed to extract DefId: opt_local_def_id_to_hir_id 125eac7a212f5b05-e622b4e51539e7c8', compiler\rustc_middle\src\dep_graph\dep_node.rs:181:17
stack backtrace:
   0:     0x7ff86442849c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hefade6aac6085c84
   1:     0x7ff86446216b - core::fmt::write::h1f35b1184ff0f480
   2:     0x7ff86441d62f - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h27cfb0803011a5f7
   3:     0x7ff86442824b - std::sys::common::alloc::realloc_fallback::h3b5c9a6b34bbe603
   4:     0x7ff86442baba - std::panicking::default_hook::h3166ed90fcd2c76f
   5:     0x7ff86442b70f - std::panicking::default_hook::h3166ed90fcd2c76f
   6:     0x7ff84c803c20 - rustc_driver_impl[d6a86f38d10169a1]::describe_lints
   7:     0x7ff86442c3b8 - std::panicking::rust_panic_with_hook::hbace1a9b1b8ee799
   8:     0x7ff86442c11d - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h16f12e9924294ce4
   9:     0x7ff8644290e9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hefade6aac6085c84
  10:     0x7ff86442be20 - rust_begin_unwind
  11:     0x7ff864495c55 - core::panicking::panic_fmt::hab6278d82627a88a
  12:     0x7ff84d8dd480 - rustc_middle[74febca20631dbdd]::util::bug::trigger_delay_span_bug
  13:     0x7ff84c6983af - <rustc_query_system[50153ceecec5f310]::dep_graph::dep_node::DepNode<rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepKind> as rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  14:     0x7ff84b44de17 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  15:     0x7ff84c1a63de - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  16:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  17:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  18:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  19:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  20:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  21:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  22:     0x7ff84c1d4df9 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  23:     0x7ff84c17ada7 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  24:     0x7ff84c58098b - <rustc_trait_selection[5094575f8b0e8265]::traits::fulfill::FulfillProcessor as rustc_data_structures[125cc2dd1c06cfca]::obligation_forest::ObligationProcessor>::process_obligation
  25:     0x7ff84c5bac50 - rustc_trait_selection[5094575f8b0e8265]::traits::query::dropck_outlives::dtorck_constraint_for_ty_inner
  26:     0x7ff84c57bc47 - <rustc_trait_selection[5094575f8b0e8265]::traits::fulfill::FulfillmentContext as rustc_infer[8d3f98913b0a654b]::traits::engine::TraitEngine>::select_where_possible 
  27:     0x7ff84c0ee62b - <polonius_engine[e541eae3a9be876b]::facts::AllFacts<rustc_borrowck[1b5cef0a25b9f998]::facts::RustcFacts> as rustc_borrowck[1b5cef0a25b9f998]::facts::AllFactsExt>::enabled
  28:     0x7ff84c15dab5 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  29:     0x7ff84c154a86 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  30:     0x7ff84b50f9f6 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  31:     0x7ff84b4a7229 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  32:     0x7ff84c2096f7 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  33:     0x7ff84c19f05b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  34:     0x7ff84b958c1c - LLVMRustStringWriteImpl
  35:     0x7ff84c15d310 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  36:     0x7ff84c1ce828 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  37:     0x7ff84c17b061 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  38:     0x7ff84c6ba3ed - <rustc_middle[74febca20631dbdd]::ty::instance::Instance>::expect_resolve
  39:     0x7ff84bb851ee - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_constant
  40:     0x7ff84bb81d47 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  41:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  42:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  43:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  44:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  45:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  46:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  47:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  48:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  49:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  50:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  51:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  52:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  53:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  54:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  55:     0x7ff84b1fbaca - rustc_monomorphize[b97fd47bf5009b97]::provide
  56:     0x7ff84b1fd252 - rustc_monomorphize[b97fd47bf5009b97]::provide
  57:     0x7ff84b1f9399 - rustc_monomorphize[b97fd47bf5009b97]::provide
  58:     0x7ff84b1f9d20 - rustc_monomorphize[b97fd47bf5009b97]::provide
  59:     0x7ff84b4620aa - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  60:     0x7ff84b4977dd - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  61:     0x7ff84b50f91c - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  62:     0x7ff84b4a6917 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  63:     0x7ff84b4c5d67 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  64:     0x7ff84d179e70 - <icu_provider_adapters[df6cd449f6197fb9]::empty::EmptyDataProvider>::new
  65:     0x7ff848bcbab0 - <rustc_codegen_llvm[99f9eaeb0a26bd1d]::builder::Builder as rustc_codegen_ssa[9e6b26acb9a44d35]::traits::builder::BuilderMethods>::unchecked_umul
  66:     0x7ff848b8d241 - <rustc_codegen_llvm[99f9eaeb0a26bd1d]::LlvmCodegenBackend as rustc_codegen_ssa[9e6b26acb9a44d35]::traits::backend::CodegenBackend>::codegen_crate
  67:     0x7ff848b615e7 - rustc_interface[27224a7143bf90ae]::callbacks::setup_callbacks
  68:     0x7ff848b56f9a - rustc_interface[27224a7143bf90ae]::passes::start_codegen
  69:     0x7ff848b586f8 - rustc_interface[27224a7143bf90ae]::passes::start_codegen
  70:     0x7ff848b4d695 - <rustc_interface[27224a7143bf90ae]::queries::Queries>::ongoing_codegen
  71:     0x7ff848b18207 - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  72:     0x7ff848b1683a - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  73:     0x7ff848b1499d - rustc_driver_impl[d6a86f38d10169a1]::args::arg_expand_all
  74:     0x7ff848b2e8f9 - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  75:     0x7ff848b15466 - rustc_driver_impl[d6a86f38d10169a1]::args::arg_expand_all
  76:     0x7ff86443fa3c - std::sys::windows::thread::Thread::new::he800403d384e6915
  77:     0x7ff8efd7257d - BaseThreadInitThunk
  78:     0x7ff8f168aa68 - RtlUserThreadStart

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0 (5680fa18f 2023-08-23) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `loader: shuttle_runtime::alpha::Loader<shuttle_runtime::provisioner_factory::ProvisionerFactory>`
#1 [codegen_select_candidate] computing candidate for `<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>> as tower::util::ServiceExt<http::request::Request<hyper::body::body::Body>>>`
#2 [resolve_instance] resolving instance `<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>> as tower::util::ServiceExt<http::request::Request<hyper::body::body::Body>>>::map_response::<[closure@tonic::transport::service::router::Routes::add_service<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>>>::{closure#0}], http::response::Response<http_body::combinators::box_body::UnsyncBoxBody<bytes::bytes::Bytes, axum_core::error::Error>>>`  
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 opt_def_kind(thread 'rustc' panicked at 'Failed to extract DefId: opt_def_kind 125eac7a212f5b05-e622b4e51539e7c8', compiler\rustc_middle\src\dep_graph\dep_node.rs:181:17
stack backtrace:
   0:     0x7ff86442849c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hefade6aac6085c84
   1:     0x7ff86446216b - core::fmt::write::h1f35b1184ff0f480
   2:     0x7ff86441d62f - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h27cfb0803011a5f7
   3:     0x7ff86442824b - std::sys::common::alloc::realloc_fallback::h3b5c9a6b34bbe603
   4:     0x7ff86442baba - std::panicking::default_hook::h3166ed90fcd2c76f
   5:     0x7ff86442b70f - std::panicking::default_hook::h3166ed90fcd2c76f
   6:     0x7ff84c803c20 - rustc_driver_impl[d6a86f38d10169a1]::describe_lints
   7:     0x7ff86442c3b8 - std::panicking::rust_panic_with_hook::hbace1a9b1b8ee799
   8:     0x7ff86442c11d - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::h16f12e9924294ce4
   9:     0x7ff8644290e9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hefade6aac6085c84
  10:     0x7ff86442be20 - rust_begin_unwind
  11:     0x7ff864495c55 - core::panicking::panic_fmt::hab6278d82627a88a
  12:     0x7ff84d8dd480 - rustc_middle[74febca20631dbdd]::util::bug::trigger_delay_span_bug
  13:     0x7ff84c6983af - <rustc_query_system[50153ceecec5f310]::dep_graph::dep_node::DepNode<rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepKind> as rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  14:     0x7ff84d968033 - <rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepKind as rustc_query_system[50153ceecec5f310]::dep_graph::DepKind>::debug_node
  15:     0x7ff86446216b - core::fmt::write::h1f35b1184ff0f480
  16:     0x7ff86441a503 - <&std::io::stdio::Stderr as std::io::Write>::write_fmt::hcb6f8ce489202127
  17:     0x7ff86441b10d - std::io::stdio::_eprint::h461a6bc61b59e5a8
  18:     0x7ff84d243d28 - <rustc_middle[74febca20631dbdd]::ty::subst::EarlyBinder<rustc_middle[74febca20631dbdd]::ty::Ty> as rustc_query_system[50153ceecec5f310]::values::Value<rustc_middle[74febca20631dbdd]::ty::context::TyCtxt, rustc_middle[74febca20631dbdd]::dep_graph::dep_node::DepKind>>::from_cycle_error
  19:     0x7ff84c1a715e - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  20:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  21:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  22:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  23:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  24:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  25:     0x7ff84c1a637b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  26:     0x7ff84c1d4df9 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  27:     0x7ff84c17ada7 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  28:     0x7ff84c58098b - <rustc_trait_selection[5094575f8b0e8265]::traits::fulfill::FulfillProcessor as rustc_data_structures[125cc2dd1c06cfca]::obligation_forest::ObligationProcessor>::process_obligation
  29:     0x7ff84c5bac50 - rustc_trait_selection[5094575f8b0e8265]::traits::query::dropck_outlives::dtorck_constraint_for_ty_inner
  30:     0x7ff84c57bc47 - <rustc_trait_selection[5094575f8b0e8265]::traits::fulfill::FulfillmentContext as rustc_infer[8d3f98913b0a654b]::traits::engine::TraitEngine>::select_where_possible 
  31:     0x7ff84c0ee62b - <polonius_engine[e541eae3a9be876b]::facts::AllFacts<rustc_borrowck[1b5cef0a25b9f998]::facts::RustcFacts> as rustc_borrowck[1b5cef0a25b9f998]::facts::AllFactsExt>::enabled
  32:     0x7ff84c15dab5 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  33:     0x7ff84c154a86 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  34:     0x7ff84b50f9f6 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  35:     0x7ff84b4a7229 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  36:     0x7ff84c2096f7 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  37:     0x7ff84c19f05b - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  38:     0x7ff84b958c1c - LLVMRustStringWriteImpl
  39:     0x7ff84c15d310 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  40:     0x7ff84c1ce828 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  41:     0x7ff84c17b061 - rustc_query_impl[d3631593b93fe24f]::query_callbacks
  42:     0x7ff84c6ba3ed - <rustc_middle[74febca20631dbdd]::ty::instance::Instance>::expect_resolve
  43:     0x7ff84bb851ee - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_constant
  44:     0x7ff84bb81d47 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  45:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  46:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  47:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  48:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  49:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  50:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  51:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  52:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  53:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  54:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  55:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  56:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  57:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  58:     0x7ff84bb831e2 - <rustc_monomorphize[b97fd47bf5009b97]::collector::MirUsedCollector as rustc_middle[74febca20631dbdd]::mir::visit::Visitor>::visit_operand
  59:     0x7ff84b1fbaca - rustc_monomorphize[b97fd47bf5009b97]::provide
  60:     0x7ff84b1fd252 - rustc_monomorphize[b97fd47bf5009b97]::provide
  61:     0x7ff84b1f9399 - rustc_monomorphize[b97fd47bf5009b97]::provide
  62:     0x7ff84b1f9d20 - rustc_monomorphize[b97fd47bf5009b97]::provide
  63:     0x7ff84b4620aa - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  64:     0x7ff84b4977dd - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  65:     0x7ff84b50f91c - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  66:     0x7ff84b4a6917 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  67:     0x7ff84b4c5d67 - rustc_query_impl[d3631593b93fe24f]::profiling_support::alloc_self_profile_query_strings
  68:     0x7ff84d179e70 - <icu_provider_adapters[df6cd449f6197fb9]::empty::EmptyDataProvider>::new
  69:     0x7ff848bcbab0 - <rustc_codegen_llvm[99f9eaeb0a26bd1d]::builder::Builder as rustc_codegen_ssa[9e6b26acb9a44d35]::traits::builder::BuilderMethods>::unchecked_umul
  70:     0x7ff848b8d241 - <rustc_codegen_llvm[99f9eaeb0a26bd1d]::LlvmCodegenBackend as rustc_codegen_ssa[9e6b26acb9a44d35]::traits::backend::CodegenBackend>::codegen_crate
  71:     0x7ff848b615e7 - rustc_interface[27224a7143bf90ae]::callbacks::setup_callbacks
  72:     0x7ff848b56f9a - rustc_interface[27224a7143bf90ae]::passes::start_codegen
  73:     0x7ff848b586f8 - rustc_interface[27224a7143bf90ae]::passes::start_codegen
  74:     0x7ff848b4d695 - <rustc_interface[27224a7143bf90ae]::queries::Queries>::ongoing_codegen
  75:     0x7ff848b18207 - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  76:     0x7ff848b1683a - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  77:     0x7ff848b1499d - rustc_driver_impl[d6a86f38d10169a1]::args::arg_expand_all
  78:     0x7ff848b2e8f9 - <rustc_middle[74febca20631dbdd]::ty::SymbolName as core[6466dd2577e7e27a]::fmt::Display>::fmt
  79:     0x7ff848b15466 - rustc_driver_impl[d6a86f38d10169a1]::args::arg_expand_all
  80:     0x7ff86443fa3c - std::sys::windows::thread::Thread::new::he800403d384e6915
  81:     0x7ff8efd7257d - BaseThreadInitThunk
  82:     0x7ff8f168aa68 - RtlUserThreadStart

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0 (5680fa18f 2023-08-23) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `loader: shuttle_runtime::alpha::Loader<shuttle_runtime::provisioner_factory::ProvisionerFactory>`
#1 [codegen_select_candidate] computing candidate for `<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>> as tower::util::ServiceExt<http::request::Request<hyper::body::body::Body>>>`
#2 [resolve_instance] resolving instance `<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>> as tower::util::ServiceExt<http::request::Request<hyper::body::body::Body>>>::map_response::<[closure@tonic::transport::service::router::Routes::add_service<shuttle_proto::runtime::runtime_server::RuntimeServer<shuttle_runtime::alpha::Alpha<loader, OtherArbitraryRenaming>>>::{closure#0}], http::response::Response<http_body::combinators::box_body::UnsyncBoxBody<bytes::bytes::Bytes, axum_core::error::Error>>>`  
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `test` (bin "test")

@xzihnago xzihnago added 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. labels Sep 21, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 21, 2023
@matthiaskrgr matthiaskrgr added the A-incr-comp Area: Incremental compilation label Sep 21, 2023
@saethlin saethlin added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 21, 2023
@sivizius
Copy link

I was able to reproduce a similar/the same ICE in 1.76.0.

@pacak
Copy link
Contributor

pacak commented Jun 30, 2024

No longer reproduces with current nightly, fixed by #126409 I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

No branches or pull requests

6 participants