Repository: rust
Issue: [ICE]: `None` in compiler/rustc_middle/src/ty/sty.rs 
Labels: I-ICE,T-compiler,C-bug,F-generic_const_exprs

### Code

```rust
// crate `import`
#![feature(generic_const_exprs)]

pub struct Error(());

pub trait FromSlice: Sized {
    const SIZE: usize = std::mem::size_of::<Self>();

    fn validate_slice(bytes: &[[u8; Self::SIZE]]) -> Result<(), Error>;
}
```

```rust
// crate `compile`
struct Wrapper<const F: usize>(i64);

impl<const F: usize> import::FromSlice for Wrapper<F> {
    fn validate_slice(_: &[[u8; Self::SIZE]]) -> Result<(), import::Error> {
        Ok(())
    }
}
```

Here is a [reproduction repository](https://github.com/jean-airoldie/generic_const_exprs_bug)



### Affected release channels

- [ ] Previous Stable
- [ ] Current Stable
- [ ] Current Beta
- [X] Current Nightly

### Rust Version

```Shell
rustc 1.83.0-nightly (94885bc69 2024-09-01)
binary: rustc
commit-hash: 94885bc699512cfee8560e73c2a01ee6b4b76563
commit-date: 2024-09-01
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0
```

### Backtrace
<details>

```Shell
thread 'rustc' panicked at compiler/rustc_middle/src/ty/sty.rs:362:36:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7f7b49be0fda - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h9e4ea8242375332b
   1:     0x7f7b4a403317 - core::fmt::write::h9b917be92761bedd
   2:     0x7f7b4b68e511 - std::io::Write::write_fmt::hf10f74df1e5b6fa4
   3:     0x7f7b49be36ab - std::panicking::default_hook::{{closure}}::h799453937b6df850
   4:     0x7f7b49be331e - std::panicking::default_hook::hc680c13beada54ab
   5:     0x7f7b48d465bf - std[ecf59b95e6b43a12]::panicking::update_hook::<alloc[31dbd1cac8f6337c]::boxed::Box<rustc_driver_impl[f58cdf0c667c34ef]::install_ice_hook::{closure#0}>>::{closure#0}
   6:     0x7f7b49be3fc7 - std::panicking::rust_panic_with_hook::h2e4a6bdb3bbbd61b
   7:     0x7f7b49be3c53 - std::panicking::begin_panic_handler::{{closure}}::hc84e1fbc96f34988
   8:     0x7f7b49be1489 - std::sys::backtrace::__rust_end_short_backtrace::h7aeaaa7122aa2277
   9:     0x7f7b49be3954 - rust_begin_unwind
  10:     0x7f7b46a7b8f3 - core::panicking::panic_fmt::hfbc6547a8c5ab97a
  11:     0x7f7b46c56b4c - core::panicking::panic::h4bcfaeeec73b3c98
  12:     0x7f7b4705ce29 - core::option::unwrap_failed::h5cf8ee76ee01cf0d
  13:     0x7f7b4be5832a - <rustc_middle[71f8a8be38220e7e]::ty::sty::ParamConst>::find_ty_from_env.cold
  14:     0x7f7b46a46ce3 - <rustc_trait_selection[ab06c6a7623855cc]::traits::fulfill::FulfillProcessor as rustc_data_structures[b731aafeb3707255]::obligation_forest::ObligationProcessor>::process_obligation
  15:     0x7f7b4a6d0fc1 - <rustc_data_structures[b731aafeb3707255]::obligation_forest::ObligationForest<rustc_trait_selection[ab06c6a7623855cc]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[ab06c6a7623855cc]::traits::fulfill::FulfillProcessor>
  16:     0x7f7b46e7099c - rustc_traits[fb2d6fa60ddec9cc]::codegen::codegen_select_candidate
  17:     0x7f7b4a6252f7 - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::codegen_select_candidate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 16usize]>>
  18:     0x7f7b4a6251e7 - <rustc_query_impl[244de25550980a16]::query_impl::codegen_select_candidate::dynamic_query::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<(rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt, (rustc_middle[71f8a8be38220e7e]::ty::ParamEnv, rustc_type_ir[6f674afaeb747360]::predicate::TraitRef<rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>))>>::call_once
  19:     0x7f7b4a6251a9 - <rustc_query_system[103c552ffa7387b6]::query::plumbing::execute_job_incr<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::instance::InstanceKind, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<((rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::instance::InstanceKind, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 16usize]>>, false, false, false>), rustc_middle[71f8a8be38220e7e]::ty::instance::InstanceKind)>>::call_once
  20:     0x7f7b4a623cf8 - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<(rustc_middle[71f8a8be38220e7e]::ty::ParamEnv, rustc_type_ir[6f674afaeb747360]::predicate::TraitRef<rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>), rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  21:     0x7f7b4a622e0a - rustc_query_impl[244de25550980a16]::query_impl::codegen_select_candidate::get_query_incr::__rust_end_short_backtrace
  22:     0x7f7b47768473 - rustc_ty_utils[6cd42ba9b28f8a5]::instance::resolve_instance_raw
  23:     0x7f7b4a9e1469 - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::resolve_instance_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 32usize]>>
  24:     0x7f7b4a9e46a3 - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<(rustc_span[610038f17dad7590]::def_id::DefId, &rustc_middle[71f8a8be38220e7e]::ty::list::RawList<(), rustc_middle[71f8a8be38220e7e]::ty::generic_args::GenericArg>)>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  25:     0x7f7b4a9e3371 - rustc_query_impl[244de25550980a16]::query_impl::resolve_instance_raw::get_query_incr::__rust_end_short_backtrace
  26:     0x7f7b4743d3a6 - <rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>::const_eval_resolve
  27:     0x7f7b4b045f13 - rustc_const_eval[1913f98e05e774cc]::const_eval::eval_queries::eval_to_allocation_raw_provider
  28:     0x7f7b4b043936 - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>
  29:     0x7f7b4b0438ef - <rustc_query_impl[244de25550980a16]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<(rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt, rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>)>>::call_once
  30:     0x7f7b4b03f9b1 - <rustc_query_system[103c552ffa7387b6]::query::plumbing::execute_job_incr<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<((rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>)>>::call_once
  31:     0x7f7b4b02aaae - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  32:     0x7f7b4b029fb6 - rustc_query_impl[244de25550980a16]::query_impl::eval_to_allocation_raw::get_query_incr::__rust_end_short_backtrace
  33:     0x7f7b4b0260b3 - rustc_const_eval[1913f98e05e774cc]::const_eval::valtrees::eval_to_valtree
  34:     0x7f7b4b025ec3 - <rustc_const_eval[1913f98e05e774cc]::provide::{closure#0} as core[5fb974e6fca9f855]::ops::function::FnOnce<(rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt, rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>)>>::call_once
  35:     0x7f7b4b025e7a - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>
  36:     0x7f7b4b025e3b - <rustc_query_impl[244de25550980a16]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<(rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt, rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>)>>::call_once
  37:     0x7f7b4b03f9b1 - <rustc_query_system[103c552ffa7387b6]::query::plumbing::execute_job_incr<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5fb974e6fca9f855]::ops::function::FnOnce<((rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>)>>::call_once
  38:     0x7f7b4b02aaae - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  39:     0x7f7b4b5547d2 - rustc_query_impl[244de25550980a16]::query_impl::eval_to_valtree::get_query_incr::__rust_end_short_backtrace
  40:     0x7f7b4ad1ed31 - rustc_middle[71f8a8be38220e7e]::query::plumbing::query_get_at::<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_middle[71f8a8be38220e7e]::ty::ParamEnvAnd<rustc_middle[71f8a8be38220e7e]::mir::interpret::GlobalId>, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 24usize]>>>
  41:     0x7f7b4ad1e76c - <rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  42:     0x7f7b4ad1d70a - <rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  43:     0x7f7b4ad1d3ca - <rustc_middle[71f8a8be38220e7e]::ty::consts::Const>::eval
  44:     0x7f7b4ad1d2b1 - <rustc_trait_selection[ab06c6a7623855cc]::traits::normalize_param_env_or_error::{closure#0}::ConstNormalizer as rustc_type_ir[6f674afaeb747360]::fold::TypeFolder<rustc_middle[71f8a8be38220e7e]::ty::context::TyCtxt>>::fold_const
  45:     0x7f7b4a6ae8f2 - rustc_trait_selection[ab06c6a7623855cc]::traits::normalize_param_env_or_error
  46:     0x7f7b4683ac61 - rustc_hir_analysis[8068b17b6f30bb44]::check::check::check_impl_items_against_trait
  47:     0x7f7b47a57802 - rustc_hir_analysis[8068b17b6f30bb44]::check::wfcheck::check_well_formed
  48:     0x7f7b4a5fc547 - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>
  49:     0x7f7b4a5ffc76 - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::VecCache<rustc_hir[701aa597c7450dd7]::hir_id::OwnerId, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  50:     0x7f7b4a5ff684 - rustc_query_impl[244de25550980a16]::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
  51:     0x7f7b4a5fd2ff - rustc_hir_analysis[8068b17b6f30bb44]::check::wfcheck::check_mod_type_wf
  52:     0x7f7b4a5fd11f - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>
  53:     0x7f7b4b36ab0c - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::DefaultCache<rustc_span[610038f17dad7590]::def_id::LocalModDefId, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  54:     0x7f7b4b36b7db - rustc_query_impl[244de25550980a16]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  55:     0x7f7b4a6027fd - rustc_hir_analysis[8068b17b6f30bb44]::check_crate
  56:     0x7f7b4a615391 - rustc_interface[de5c4d81e4829e2d]::passes::run_required_analyses
  57:     0x7f7b4b1cc1de - rustc_interface[de5c4d81e4829e2d]::passes::analysis
  58:     0x7f7b4b1cc1b1 - rustc_query_impl[244de25550980a16]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[244de25550980a16]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>
  59:     0x7f7b4b5aa8cd - rustc_query_system[103c552ffa7387b6]::query::plumbing::try_execute_query::<rustc_query_impl[244de25550980a16]::DynamicConfig<rustc_query_system[103c552ffa7387b6]::query::caches::SingleCache<rustc_middle[71f8a8be38220e7e]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[244de25550980a16]::plumbing::QueryCtxt, true>
  60:     0x7f7b4b5aa57a - rustc_query_impl[244de25550980a16]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  61:     0x7f7b4b1ae72c - rustc_interface[de5c4d81e4829e2d]::interface::run_compiler::<core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>, rustc_driver_impl[f58cdf0c667c34ef]::run_compiler::{closure#0}>::{closure#1}
  62:     0x7f7b4b26e550 - std[ecf59b95e6b43a12]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[de5c4d81e4829e2d]::util::run_in_thread_with_globals<rustc_interface[de5c4d81e4829e2d]::util::run_in_thread_pool_with_globals<rustc_interface[de5c4d81e4829e2d]::interface::run_compiler<core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>, rustc_driver_impl[f58cdf0c667c34ef]::run_compiler::{closure#0}>::{closure#1}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>::{closure#0}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>
  63:     0x7f7b4b26ebba - <<std[ecf59b95e6b43a12]::thread::Builder>::spawn_unchecked_<rustc_interface[de5c4d81e4829e2d]::util::run_in_thread_with_globals<rustc_interface[de5c4d81e4829e2d]::util::run_in_thread_pool_with_globals<rustc_interface[de5c4d81e4829e2d]::interface::run_compiler<core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>, rustc_driver_impl[f58cdf0c667c34ef]::run_compiler::{closure#0}>::{closure#1}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>::{closure#0}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5fb974e6fca9f855]::result::Result<(), rustc_span[610038f17dad7590]::ErrorGuaranteed>>::{closure#1} as core[5fb974e6fca9f855]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:     0x7f7b4b26ef2b - std::sys::pal::unix::thread::Thread::new::thread_start::hfdfe3dde17dd08a8
  65:     0x7f7b456a8144 - start_thread
                               at ./nptl/pthread_create.c:442:8
  66:     0x7f7b457287dc - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  67:                0x0 - <unknown>

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 `/home/maxence/bug/generic_const_exprs_bug/rustc-ice-2024-09-02T09_05_03-321153.txt` to your bug report

note: compiler flags: --crate-type lib -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 [codegen_select_candidate] computing candidate for `<Wrapper<F> as import::FromSlice>`
#1 [resolve_instance_raw] resolving instance `<Wrapper<F> as import::FromSlice>::SIZE`
#2 [eval_to_allocation_raw] const-evaluating + checking `import::FromSlice::validate_slice::{constant#0}`
#3 [eval_to_valtree] evaluating type-level constant
#4 [check_well_formed] checking that `<impl at compile/src/lib.rs:3:1: 3:54>` is well-formed
#5 [check_mod_type_wf] checking that types are well-formed in top-level module
#6 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `compile` (lib)
```
</details>


### Anything else?

Issue is solved when `generic_const_exprs` is enabled in the `compile` crate. In other words, when a dependency requires `generic_const_exprs` but it is not set in the current library, this ICE occurs.

I'm guessing this is related to #125958 based on the other issues i've seen.

EDIT1: Updated to latest nightly
EDIT2: Added actual code example instead of just repository
EDIT3: Made backtrace collapsible and removed error output