Repository: rust
Issue: ICE: `assertion failed: layout.is_sized()` with `feature(associated_const_equality)`
Labels: I-ICE,T-compiler,C-bug,A-layout,S-bug-has-test,F-associated_const_equality

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

Similar to #124182 and https://github.com/rust-lang/rust/issues/124182#issuecomment-2082181338 but this requires `feature(associated_const_equality)` 

### Code

```Rust
#![feature(associated_const_equality)]

fn user() -> impl Owner<dyn Sized, C = 0> {}

trait Owner<K> {
    const C: K;
}
impl<K: ConstDefault> Owner<K> for () {
    const C: K = K::DEFAULT;
}

trait ConstDefault {
    const DEFAULT: Self;
}

fn main() {}
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.81.0-nightly (5315cbe15 2024-07-11)
binary: rustc
commit-hash: 5315cbe15b79533f380bbb6685aa5480d5ff4ef5
commit-date: 2024-07-11
host: x86_64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7
```

### Error output

```
error[E0038]: the trait `Sized` cannot be made into an object
 --> ./7D4ED.rs:3:40
  |
3 | fn user() -> impl Owner<dyn Sized, C = 0> {}
  |                                        ^ `Sized` cannot be made into an object
  |
  = note: the trait cannot be made into an object because it requires `Self: Sized`
  = note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>

error[E0277]: the size for values of type `(dyn Sized + 'static)` cannot be known at compilation time
 --> ./7D4ED.rs:3:40
  |
3 | fn user() -> impl Owner<dyn Sized, C = 0> {}
  |                                        ^ doesn't have a size known at compile-time
  |
  = help: the trait `Sized` is not implemented for `(dyn Sized + 'static)`
  = note: constant expressions must have a statically known size


error[E0308]: mismatched types
 --> ./7D4ED.rs:3:40
  |
3 | fn user() -> impl Owner<dyn Sized, C = 0> {}
  |                                        ^ expected `dyn Sized`, found integer
  |
  = note: expected trait object `(dyn Sized + 'static)`
                     found type `{integer}`
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
thread 'rustc' panicked at compiler/rustc_const_eval/src/const_eval/eval_queries.rs:56:5:
assertion failed: layout.is_sized()
stack backtrace:
   0:        0x108bf6de3 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf00aa499f5d1516a
   1:        0x108c421cb - core::fmt::write::h7356a6f482d181da
   2:        0x108beca0e - std::io::Write::write_fmt::h8ddc6f6102691394
   3:        0x108bf6bd1 - std::sys::backtrace::print::h7451c2c196ba31e6
   4:        0x108bf99a9 - std::panicking::default_hook::{{closure}}::h316e57749789608a
   5:        0x108bf972a - std::panicking::default_hook::hedca736659c208b3
   6:        0x111f68aec - std[2c79ef40a976ec2e]::panicking::update_hook::<alloc[16e42ec7d1557b68]::boxed::Box<rustc_driver_impl[27c8b25c9f3d06a4]::install_ice_hook::{closure#0}>>::{closure#0}
   7:        0x108bfa6e9 - std::panicking::rust_panic_with_hook::h8a65898292def58d
   8:        0x108bf9ef2 - std::panicking::begin_panic_handler::{{closure}}::he3facf3dfacc5dce
   9:        0x108bf72b9 - std::sys::backtrace::__rust_end_short_backtrace::h6ca1bfa428ac13fd
  10:        0x108bf9b3c - _rust_begin_unwind
  11:        0x108c5d4da - core::panicking::panic_fmt::h9e8318fbc5841095
  12:        0x108c5d584 - core::panicking::panic::hdbf59c9d79b0ea8c
  13:        0x111ee9a46 - rustc_const_eval[391c5516e2e88642]::const_eval::eval_queries::eval_to_allocation_raw_provider
  14:        0x1136411ec - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>
  15:        0x1135f634e - <rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2} as core[bea900a08e785f72]::ops::function::FnOnce<(rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>)>>::call_once
  16:        0x11345b89d - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  17:        0x11366c09c - rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_allocation_raw::get_query_non_incr::__rust_end_short_backtrace
  18:        0x111e11b02 - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_get_at::<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>>
  19:        0x111e944d1 - rustc_const_eval[391c5516e2e88642]::const_eval::valtrees::eval_to_valtree
  20:        0x1128d1013 - <rustc_const_eval[391c5516e2e88642]::provide::{closure#0} as core[bea900a08e785f72]::ops::function::FnOnce<(rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>)>>::call_once
  21:        0x11363e46c - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>
  22:        0x1135d91be - <rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[bea900a08e785f72]::ops::function::FnOnce<(rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>)>>::call_once
  23:        0x11345b89d - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  24:        0x11366cddc - rustc_query_impl[3c53c1661716b714]::query_impl::eval_to_valtree::get_query_non_incr::__rust_end_short_backtrace
  25:        0x112cc1916 - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_get_at::<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::mir::interpret::GlobalId>, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 24usize]>>>
  26:        0x112cc6428 - <rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  27:        0x112cc5de2 - <rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  28:        0x113b6b0f1 - <rustc_middle[8bdaeab61483d4d8]::ty::consts::Const>::eval
  29:        0x113c2bf62 - rustc_trait_selection[60889f445809357a]::traits::util::with_replaced_escaping_bound_vars::<rustc_middle[8bdaeab61483d4d8]::ty::consts::Const, rustc_middle[8bdaeab61483d4d8]::ty::consts::Const, <rustc_trait_selection[60889f445809357a]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[e5638ab1c7844ec]::fold::TypeFolder<rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt>>::fold_const::{closure#0}>
  30:        0x113c08692 - <rustc_trait_selection[60889f445809357a]::traits::normalize::AssocTypeNormalizer>::fold::<rustc_middle[8bdaeab61483d4d8]::ty::Term>
  31:        0x113c9e90b - rustc_trait_selection[60889f445809357a]::traits::normalize::normalize_with_depth_to::<rustc_middle[8bdaeab61483d4d8]::ty::Term>
  32:        0x113ca6fce - rustc_trait_selection[60889f445809357a]::traits::project::opt_normalize_projection_term
  33:        0x113ab596e - <rustc_infer[2ef9fa23c9370ab]::infer::InferCtxt>::commit_if_ok::<rustc_trait_selection[60889f445809357a]::traits::project::ProjectAndUnifyResult, rustc_infer[2ef9fa23c9370ab]::traits::project::MismatchedProjectionTypes, rustc_trait_selection[60889f445809357a]::traits::project::poly_project_and_unify_term::{closure#0}>
  34:        0x113cbcb02 - <rustc_trait_selection[60889f445809357a]::traits::select::SelectionContext>::evaluate_predicate_recursively::{closure#0}::{closure#0}
  35:        0x113cbc170 - <rustc_trait_selection[60889f445809357a]::traits::select::SelectionContext>::evaluate_predicate_recursively
  36:        0x113c23693 - <rustc_trait_selection[60889f445809357a]::traits::select::SelectionContext>::evaluation_probe::<<rustc_trait_selection[60889f445809357a]::traits::select::SelectionContext>::evaluate_root_obligation::{closure#0}>::{closure#0}
  37:        0x113c230ce - <rustc_trait_selection[60889f445809357a]::traits::select::SelectionContext>::evaluate_root_obligation
  38:        0x113d508e2 - rustc_traits[3f4d8ea00f8f04a]::evaluate_obligation::evaluate_obligation
  39:        0x1136404ef - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 2usize]>>
  40:        0x1135eda7f - <rustc_query_impl[3c53c1661716b714]::query_impl::evaluate_obligation::dynamic_query::{closure#2} as core[bea900a08e785f72]::ops::function::FnOnce<(rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_type_ir[e5638ab1c7844ec]::canonical::Canonical<rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::ty::predicate::Predicate>>)>>::call_once
  41:        0x113445b85 - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_type_ir[e5638ab1c7844ec]::canonical::Canonical<rustc_middle[8bdaeab61483d4d8]::ty::context::TyCtxt, rustc_middle[8bdaeab61483d4d8]::ty::ParamEnvAnd<rustc_middle[8bdaeab61483d4d8]::ty::predicate::Predicate>>, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  42:        0x11369f325 - rustc_query_impl[3c53c1661716b714]::query_impl::evaluate_obligation::get_query_non_incr::__rust_end_short_backtrace
  43:        0x113caab74 - <rustc_infer[2ef9fa23c9370ab]::infer::InferCtxt as rustc_trait_selection[60889f445809357a]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  44:        0x113caaf03 - <rustc_infer[2ef9fa23c9370ab]::infer::InferCtxt as rustc_trait_selection[60889f445809357a]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  45:        0x113c0352c - <rustc_trait_selection[60889f445809357a]::traits::fulfill::FulfillProcessor>::process_projection_obligation
  46:        0x113c99ddf - <rustc_trait_selection[60889f445809357a]::traits::fulfill::FulfillProcessor as rustc_data_structures[cbb72a317274e88]::obligation_forest::ObligationProcessor>::process_obligation
  47:        0x1123b89d9 - <rustc_data_structures[cbb72a317274e88]::obligation_forest::ObligationForest<rustc_trait_selection[60889f445809357a]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[60889f445809357a]::traits::fulfill::FulfillProcessor>
  48:        0x1124b10e2 - <rustc_trait_selection[60889f445809357a]::traits::fulfill::FulfillmentContext<rustc_trait_selection[60889f445809357a]::traits::FulfillmentError> as rustc_infer[2ef9fa23c9370ab]::traits::engine::TraitEngine<rustc_trait_selection[60889f445809357a]::traits::FulfillmentError>>::select_where_possible
  49:        0x1125296c7 - <rustc_hir_typeck[e3769b60c471e9a6]::fn_ctxt::FnCtxt>::check_return_expr
  50:        0x1125ea756 - rustc_hir_typeck[e3769b60c471e9a6]::check::check_fn
  51:        0x1125e5e71 - rustc_hir_typeck[e3769b60c471e9a6]::typeck
  52:        0x113643b3c - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>
  53:        0x1134cb54e - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::VecCache<rustc_span[29d93d8cf2566dd4]::def_id::LocalDefId, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  54:        0x1136671ab - rustc_query_impl[3c53c1661716b714]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  55:        0x112198d03 - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_get_at::<rustc_query_system[eaebc50d0e3ac304]::query::caches::VecCache<rustc_span[29d93d8cf2566dd4]::def_id::LocalDefId, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>>
  56:        0x11230b2e6 - rustc_hir_analysis[7eb515398ec6fe38]::collect::type_of::type_of_opaque
  57:        0x11363e0ec - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>
  58:        0x11341b11f - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefIdCache<rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  59:        0x11364cfa9 - rustc_query_impl[3c53c1661716b714]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  60:        0x1121980be - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_get_at::<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefIdCache<rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>>
  61:        0x11230a397 - rustc_hir_analysis[7eb515398ec6fe38]::collect::type_of::type_of
  62:        0x113643bb8 - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>
  63:        0x11341b11f - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefIdCache<rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  64:        0x11364cbf9 - rustc_query_impl[3c53c1661716b714]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  65:        0x1121980be - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_get_at::<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefIdCache<rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 8usize]>>>
  66:        0x11226dc35 - rustc_hir_analysis[7eb515398ec6fe38]::check::check::check_item_type
  67:        0x1122a2e61 - rustc_hir_analysis[7eb515398ec6fe38]::check::wfcheck::check_well_formed
  68:        0x11363f5ac - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>
  69:        0x1134d787f - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::VecCache<rustc_hir[e24812d095db70cf]::hir_id::OwnerId, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  70:        0x113689760 - rustc_query_impl[3c53c1661716b714]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  71:        0x112199102 - rustc_middle[8bdaeab61483d4d8]::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system[eaebc50d0e3ac304]::query::caches::VecCache<rustc_hir[e24812d095db70cf]::hir_id::OwnerId, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>, ()>
  72:        0x1122b19f1 - rustc_hir_analysis[7eb515398ec6fe38]::check::wfcheck::check_mod_type_wf
  73:        0x11363f57c - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>
  74:        0x11346c409 - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::DefaultCache<rustc_span[29d93d8cf2566dd4]::def_id::LocalModDefId, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  75:        0x113666600 - rustc_query_impl[3c53c1661716b714]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  76:        0x112331d5c - rustc_hir_analysis[7eb515398ec6fe38]::check_crate
  77:        0x1128efec7 - rustc_interface[1d5b564ba8d32317]::passes::run_required_analyses
  78:        0x1128f2363 - rustc_interface[1d5b564ba8d32317]::passes::analysis
  79:        0x113643bec - rustc_query_impl[3c53c1661716b714]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3c53c1661716b714]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>
  80:        0x11342640e - rustc_query_system[eaebc50d0e3ac304]::query::plumbing::try_execute_query::<rustc_query_impl[3c53c1661716b714]::DynamicConfig<rustc_query_system[eaebc50d0e3ac304]::query::caches::SingleCache<rustc_middle[8bdaeab61483d4d8]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[3c53c1661716b714]::plumbing::QueryCtxt, false>
  81:        0x11364e147 - rustc_query_impl[3c53c1661716b714]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  82:        0x111f09887 - <rustc_interface[1d5b564ba8d32317]::queries::QueryResult<&rustc_middle[8bdaeab61483d4d8]::ty::context::GlobalCtxt>>::enter::<core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>, rustc_driver_impl[27c8b25c9f3d06a4]::run_compiler::{closure#0}::{closure#1}::{closure#5}>
  83:        0x111f6739b - rustc_interface[1d5b564ba8d32317]::interface::run_compiler::<core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>, rustc_driver_impl[27c8b25c9f3d06a4]::run_compiler::{closure#0}>::{closure#1}
  84:        0x111f51c21 - std[2c79ef40a976ec2e]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[1d5b564ba8d32317]::util::run_in_thread_with_globals<rustc_interface[1d5b564ba8d32317]::util::run_in_thread_pool_with_globals<rustc_interface[1d5b564ba8d32317]::interface::run_compiler<core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>, rustc_driver_impl[27c8b25c9f3d06a4]::run_compiler::{closure#0}>::{closure#1}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>::{closure#0}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>
  85:        0x111f71b86 - <<std[2c79ef40a976ec2e]::thread::Builder>::spawn_unchecked_<rustc_interface[1d5b564ba8d32317]::util::run_in_thread_with_globals<rustc_interface[1d5b564ba8d32317]::util::run_in_thread_pool_with_globals<rustc_interface[1d5b564ba8d32317]::interface::run_compiler<core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>, rustc_driver_impl[27c8b25c9f3d06a4]::run_compiler::{closure#0}>::{closure#1}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>::{closure#0}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[bea900a08e785f72]::result::Result<(), rustc_span[29d93d8cf2566dd4]::ErrorGuaranteed>>::{closure#2} as core[bea900a08e785f72]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  86:        0x108c0388b - std::sys::pal::unix::thread::Thread::new::thread_start::h704c897b848fbd6c
  87:     0x7ff801f5318b - __pthread_start

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/240710-nightly/rustc-ice-2024-07-12T06_50_46-36724.txt` to your bug report

query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at ./7D4ED.rs:8:1: 8:38>::C`
#1 [eval_to_valtree] evaluating type-level constant
end of query stack
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0038, E0277, E0308.
For more information about an error, try `rustc --explain E0038`.
```

</p>
</details>

### Note
<strong>Ice location</strong>
https://github.com/rust-lang/rust/blob/5315cbe15b79533f380bbb6685aa5480d5ff4ef5/compiler/rustc_const_eval/src/const_eval/eval_queries.rs#L55-L56

@rustbot label +F-associated_const_equality