When I am working on a faily large repository, I was hit by a rustc ICE. However, the message and the project itself is way too messy (By the way the project uses a considerable amount of generics upon generics and GATs, and I'm sure the repo is very broken to begin with) and I cannot even draft a meaningful issue report let alone locating the bug.
The ICE message is attached at the end.
The help I need is:
- Tools to pretty print the humongous single line
ParamEnvAnd. I can't find a formatter that turns the single line print into multiline pretty print - Even better, possibly some explanation on the meaning of some fields in the message.
- Insight of the nature of the bug
- Anything that can help me pinpoint the bug.
/// About hundreds of warnings ...............
error: internal compiler error: no errors encountered even though `delay_span_bug` issued
error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder { value: ProjectionPredicate(AliasTy { args: [L], def_id: DefId(0:3074 ~ epgi_core[11b1]::tree::layer::Layer::ChildCanvas) }, Term::Ty(<<E as tree::element::Element>::ChildProtocol as foundation::protocol::Protocol>::Canvas)), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [L], def_id: DefId(0:3073 ~ epgi_core[11b1]::tree::layer::Layer::ParentCanvas) }, Term::Ty(<<E as tree::element::Element>::ParentProtocol as foundation::protocol::Protocol>::Canvas)), bound_vars: [] }, Binder { value: TraitPredicate(<L as tree::layer::Layer>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<L as std::marker::Sync>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<L as std::marker::Send>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as foundation::protocol::LayerProtocol>, polarity:Positive), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [<E as tree::element::Element>::ParentProtocol], def_id: DefId(0:629 ~ epgi_core[11b1]::foundation::protocol::Protocol::Transform) }, Term::Ty(<<<E as tree::element::Element>::ParentProtocol as foundation::protocol::Protocol>::Canvas as foundation::protocol::Canvas>::Transform)), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as foundation::protocol::Protocol>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::marker::Sync>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::marker::Send>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::clone::Clone>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::marker::Copy>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ParentProtocol as std::fmt::Debug>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as foundation::protocol::LayerProtocol>, polarity:Positive), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [<E as tree::element::Element>::ChildProtocol], def_id: DefId(0:629 ~ epgi_core[11b1]::foundation::protocol::Protocol::Transform) }, Term::Ty(<<<E as tree::element::Element>::ChildProtocol as foundation::protocol::Protocol>::Canvas as foundation::protocol::Canvas>::Transform)), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as foundation::protocol::Protocol>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::marker::Sync>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::marker::Send>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::clone::Clone>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::marker::Copy>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<<E as tree::element::Element>::ChildProtocol as std::fmt::Debug>, polarity:Positive), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [R], def_id: DefId(0:3435 ~ epgi_core[11b1]::tree::render::Render::ChildProtocol) }, Term::Ty(<E as tree::element::Element>::ChildProtocol)), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [R], def_id: DefId(0:3434 ~ epgi_core[11b1]::tree::render::Render::ParentProtocol) }, Term::Ty(<E as tree::element::Element>::ParentProtocol)), bound_vars: [] }, Binder { value: TraitPredicate(<R as tree::render::LayerRender<L>>, polarity:Positive), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [R], def_id: DefId(0:3444 ~ epgi_core[11b1]::tree::render::Render::LayerOrUnit) }, Term::Ty(L)), bound_vars: [] }, Binder { value: TraitPredicate(<R as tree::render::Render>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<R as std::marker::Sync>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<R as std::marker::Send>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<E as tree::element::RenderElement<R>>, polarity:Positive), bound_vars: [] }, Binder { value: ProjectionPredicate(AliasTy { args: [E], def_id: DefId(0:2911 ~ epgi_core[11b1]::tree::element::Element::RenderOrUnit) }, Term::Ty(R)), bound_vars: [] }, Binder { value: TraitPredicate(<E as tree::element::Element>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<E as std::clone::Clone>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<E as std::marker::Sync>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<E as std::marker::Send>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<L as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<R as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<E as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: OutlivesPredicate(L, ReStatic), bound_vars: [] }, Binder { value: OutlivesPredicate(<E as tree::element::Element>::ParentProtocol, ReStatic), bound_vars: [] }, Binder { value: OutlivesPredicate(<E as tree::element::Element>::ChildProtocol, ReStatic), bound_vars: [] }, Binder { value: OutlivesPredicate(R, ReStatic), bound_vars: [] }, Binder { value: OutlivesPredicate(E, ReStatic), bound_vars: [] }], reveal: UserFacing }, value: DropckOutlives { dropped_ty: std::sync::Arc<tree::element::ElementNode<E>> } }
|
= note: delayed at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs:162:32
0: std::backtrace::Backtrace::create
1: <rustc_errors::HandlerInner>::emit_diagnostic
2: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
3: <rustc_borrowck::type_check::liveness::trace::LivenessContext>::compute_drop_data
4: rustc_borrowck::type_check::liveness::trace::trace
5: rustc_borrowck::type_check::liveness::generate
6: rustc_borrowck::type_check::type_check
7: rustc_borrowck::nll::compute_regions
8: rustc_borrowck::do_mir_borrowck
9: rustc_borrowck::mir_borrowck
10: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
11: <rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
13: rustc_query_impl::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
14: <core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::par_for_each_in<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_interface::passes::analysis::{closure#1}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
15: rustc_data_structures::sync::par_for_each_in::<&[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_interface::passes::analysis::{closure#1}::{closure#0}>::{closure#0}>
16: <rustc_session::session::Session>::time::<(), rustc_interface::passes::analysis::{closure#1}>
17: rustc_interface::passes::analysis
18: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
19: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
21: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
22: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#6}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
23: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
24: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
25: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
26: std::sys::unix::thread::Thread::new::thread_start
27: __pthread_joiner_wake
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.73.0 (cc66ad468 2023-10-03) running on aarch64-apple-darwin
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack