Repository: rust
Issue: [ICE]: Associated const projection not yet supported
Labels: I-ICE,T-compiler,C-bug,S-has-mcve,S-bug-has-test,F-associated_const_equality,WG-trait-system-refactor

### Code

```Rust
#![feature(specialization)]
#![feature(associated_const_equality)]

pub trait IsVoid
{
    const IS_VOID: bool;
}
impl<T> IsVoid for T
where
    T: ?Sized
{
    default const IS_VOID: bool = false;
}
impl IsVoid for ()
{
    const IS_VOID: bool = true;
}

pub trait NotVoid: IsVoid<IS_VOID = false>
{

}
impl<T> NotVoid for T
where
    T: IsVoid<IS_VOID = false> + ?Sized
{

}

pub trait Maybe<T>
where
    T: ?Sized
{

}
impl<T> Maybe<T> for T
where
    T: ?Sized
{

}
impl<T> Maybe<T> for ()
where
    T: NotVoid + ?Sized
{

}
```

### Affected release channels

- [ ] Previous Stable
- [ ] Current Stable
- [ ] Current Beta
- [x] Current Nightly

### Rust Version

```Shell
$ rustc --version --verbose
rustc 1.85.0-nightly (5f23ef7d3 2024-12-20)
binary: rustc
commit-hash: 5f23ef7d3f7a8c3e0ca5c4e1978829c0448a3686
commit-date: 2024-12-20
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.6
```

### Current error output

```Shell
thread 'rustc' panicked at /rustc/5f23ef7d3f7a8c3e0ca5c4e1978829c0448a3686/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs:305:25:
associated const projection is not supported yet
stack backtrace:
   0:     0x7d04bc345a25 - std::backtrace::Backtrace::create::hdebb59933e0bdc30
   1:     0x7d04ba957975 - std::backtrace::Backtrace::force_capture::h53ec951c239bfd2c
   2:     0x7d04b9ada1fe - std[da923ce35ba8e93c]::panicking::update_hook::<alloc[4441fbf4cb6e4b6f]::boxed::Box<rustc_driver_impl[c20abde1d352895d]::install_ice_hook::{closure#0}>>::{closure#0}
   3:     0x7d04ba96f8e8 - std::panicking::rust_panic_with_hook::h7657da2fd0e20b26
   4:     0x7d04ba96f5a6 - std::panicking::begin_panic_handler::{{closure}}::hcfd13c7cdcd5288f
   5:     0x7d04ba96d279 - std::sys::backtrace::__rust_end_short_backtrace::h3430a6f8e3db4577
   6:     0x7d04ba96f29d - rust_begin_unwind
   7:     0x7d04b75a9a90 - core::panicking::panic_fmt::h662311b58e97f788
   8:     0x7d04bbbe87d8 - <rustc_type_ir[ae70c870ceb953b8]::predicate::NormalizesTo<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt> as rustc_next_trait_solver[c1d5e55899188338]::solve::assembly::GoalKind<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::consider_impl_candidate
   9:     0x7d04bbc0179a - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  10:     0x7d04bbbfb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  11:     0x7d04bbbf4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  12:     0x7d04bbbefdac - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  13:     0x7d04bbc01f19 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  14:     0x7d04bbbfb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  15:     0x7d04bbbf4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  16:     0x7d04bbbefb0e - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  17:     0x7d04bbbf09f5 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  18:     0x7d04bbc02bbb - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  19:     0x7d04bbbfb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  20:     0x7d04bbbf4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  21:     0x7d04bbbefb0e - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  22:     0x7d04bbbf09f5 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  23:     0x7d04bbbe92a1 - <rustc_type_ir[ae70c870ceb953b8]::predicate::TraitPredicate<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt> as rustc_next_trait_solver[c1d5e55899188338]::solve::assembly::GoalKind<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::consider_impl_candidate
  24:     0x7d04b88e98f3 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::assemble_and_evaluate_candidates::<rustc_type_ir[ae70c870ceb953b8]::predicate::TraitPredicate<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>
  25:     0x7d04bbc014fd - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  26:     0x7d04bbbfb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  27:     0x7d04bbbf4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  28:     0x7d04bbbedefa - rustc_trait_selection[4ac552fdfe0abeba]::traits::coherence::overlap
  29:     0x7d04bb018499 - <rustc_middle[647cd99ec441dfa7]::traits::specialization_graph::Children as rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph::ChildrenExt>::insert
  30:     0x7d04bbec3075 - <rustc_middle[647cd99ec441dfa7]::traits::specialization_graph::Graph as rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph::GraphExt>::insert
  31:     0x7d04bb1f4c50 - rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph_provider
  32:     0x7d04bb1f49a1 - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::specialization_graph_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 8usize]>>
  33:     0x7d04bb420fb5 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefIdCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  34:     0x7d04bbe331e8 - rustc_query_impl[baa7e9e66730a851]::query_impl::specialization_graph_of::get_query_incr::__rust_end_short_backtrace
  35:     0x7d04bb6ab290 - rustc_hir_analysis[e35026f032d6c888]::coherence::coherent_trait
  36:     0x7d04bb6aafef - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::coherent_trait::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  37:     0x7d04bb416b72 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefIdCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  38:     0x7d04bb77d9e0 - rustc_query_impl[baa7e9e66730a851]::query_impl::coherent_trait::get_query_incr::__rust_end_short_backtrace
  39:     0x7d04b8b967d5 - rustc_hir_analysis[e35026f032d6c888]::check::wfcheck::check_well_formed
  40:     0x7d04bba1f17b - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  41:     0x7d04bb41a0d2 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_data_structures[d4cf7d399ba92dfc]::vec_cache::VecCache<rustc_span[3a9ac5c7918c6957]::def_id::LocalDefId, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[e35f56ec1f563ec5]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  42:     0x7d04bb41942e - rustc_query_impl[baa7e9e66730a851]::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
  43:     0x7d04bba1f3ec - rustc_hir_analysis[e35026f032d6c888]::check::wfcheck::check_mod_type_wf
  44:     0x7d04bba1f20b - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  45:     0x7d04bbf8aec1 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefaultCache<rustc_span[3a9ac5c7918c6957]::def_id::LocalModDefId, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  46:     0x7d04bbf8bbda - rustc_query_impl[baa7e9e66730a851]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  47:     0x7d04bb250fdc - rustc_hir_analysis[e35026f032d6c888]::check_crate
  48:     0x7d04bb40c23c - rustc_interface[ea487bdd263c790d]::passes::run_required_analyses
  49:     0x7d04bbf1629e - rustc_interface[ea487bdd263c790d]::passes::analysis
  50:     0x7d04bbf1626f - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 0usize]>>
  51:     0x7d04bbf1babc - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::SingleCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  52:     0x7d04bbf1b315 - rustc_query_impl[baa7e9e66730a851]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  53:     0x7d04bbf7f61e - rustc_interface[ea487bdd263c790d]::passes::create_and_enter_global_ctxt::<core[5897668cda8e5696]::option::Option<rustc_interface[ea487bdd263c790d]::queries::Linker>, rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  54:     0x7d04bbfd4aa8 - rustc_interface[ea487bdd263c790d]::interface::run_compiler::<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}
  55:     0x7d04bbee1c87 - std[da923ce35ba8e93c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[ea487bdd263c790d]::util::run_in_thread_with_globals<rustc_interface[ea487bdd263c790d]::util::run_in_thread_pool_with_globals<rustc_interface[ea487bdd263c790d]::interface::run_compiler<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  56:     0x7d04bbee211c - <<std[da923ce35ba8e93c]::thread::Builder>::spawn_unchecked_<rustc_interface[ea487bdd263c790d]::util::run_in_thread_with_globals<rustc_interface[ea487bdd263c790d]::util::run_in_thread_pool_with_globals<rustc_interface[ea487bdd263c790d]::interface::run_compiler<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[5897668cda8e5696]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  57:     0x7d04bbee3701 - std::sys::pal::unix::thread::Thread::new::thread_start::h1c08419e700d562f
  58:     0x7d04b62a339d - <unknown>
  59:     0x7d04b632849c - <unknown>
  60:                0x0 - <unknown>


rustc version: 1.85.0-nightly (5f23ef7d3 2024-12-20)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [specialization_graph_of] building specialization graph of trait `Maybe`
#1 [coherent_trait] coherence checking all impls of trait `Maybe`
#2 [check_well_formed] checking that `<impl at minimum_reproducable_example/src/main.rs:36:1: 38:14>` is well-formed
#3 [check_mod_type_wf] checking that types are well-formed in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack
```

### Backtrace

```Shell
Compiling minimum_reproducable_example v0.1.0 (/home/sigurd/Code/rust/sss/minimum_reproducable_example)
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
 --> minimum_reproducable_example/src/main.rs:1:12
  |
1 | #![feature(specialization)]
  |            ^^^^^^^^^^^^^^
  |
  = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
  = help: consider using `min_specialization` instead, which is more stable and complete
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `minimum_reproducable_example`
  --> minimum_reproducable_example/src/main.rs:47:2
   |
47 | }
   |  ^ consider adding a `main` function to `minimum_reproducable_example/src/main.rs`

thread 'rustc' panicked at /rustc/5f23ef7d3f7a8c3e0ca5c4e1978829c0448a3686/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs:305:25:
associated const projection is not supported yet
stack backtrace:
   0:     0x78a95ad6cdda - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h4fc5c49bc95814ca
   1:     0x78a95b41b13c - core::fmt::write::h02478b1210db5d91
   2:     0x78a95c312411 - std::io::Write::write_fmt::hf65323128dc901c4
   3:     0x78a95ad6cc32 - std::sys::backtrace::BacktraceLock::print::heed3495364f53012
   4:     0x78a95ad6f12a - std::panicking::default_hook::{{closure}}::h3a2c63f83169a713
   5:     0x78a95ad6ef73 - std::panicking::default_hook::h5d312750e94809b0
   6:     0x78a959ed9a98 - std[da923ce35ba8e93c]::panicking::update_hook::<alloc[4441fbf4cb6e4b6f]::boxed::Box<rustc_driver_impl[c20abde1d352895d]::install_ice_hook::{closure#0}>>::{closure#0}
   7:     0x78a95ad6f8e8 - std::panicking::rust_panic_with_hook::h7657da2fd0e20b26
   8:     0x78a95ad6f5a6 - std::panicking::begin_panic_handler::{{closure}}::hcfd13c7cdcd5288f
   9:     0x78a95ad6d279 - std::sys::backtrace::__rust_end_short_backtrace::h3430a6f8e3db4577
  10:     0x78a95ad6f29d - rust_begin_unwind
  11:     0x78a9579a9a90 - core::panicking::panic_fmt::h662311b58e97f788
  12:     0x78a95bfe87d8 - <rustc_type_ir[ae70c870ceb953b8]::predicate::NormalizesTo<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt> as rustc_next_trait_solver[c1d5e55899188338]::solve::assembly::GoalKind<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::consider_impl_candidate
  13:     0x78a95c00179a - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  14:     0x78a95bffb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  15:     0x78a95bff4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  16:     0x78a95bfefdac - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  17:     0x78a95c001f19 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  18:     0x78a95bffb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  19:     0x78a95bff4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  20:     0x78a95bfefb0e - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  21:     0x78a95bff09f5 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  22:     0x78a95c002bbb - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  23:     0x78a95bffb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  24:     0x78a95bff4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  25:     0x78a95bfefb0e - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::try_evaluate_added_goals
  26:     0x78a95bff09f5 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_added_goals_and_make_canonical_response::{closure#0}
  27:     0x78a95bfe92a1 - <rustc_type_ir[ae70c870ceb953b8]::predicate::TraitPredicate<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt> as rustc_next_trait_solver[c1d5e55899188338]::solve::assembly::GoalKind<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::consider_impl_candidate
  28:     0x78a958ce98f3 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::assemble_and_evaluate_candidates::<rustc_type_ir[ae70c870ceb953b8]::predicate::TraitPredicate<rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>
  29:     0x78a95c0014fd - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  30:     0x78a95bffb086 - <rustc_type_ir[ae70c870ceb953b8]::search_graph::SearchGraph<rustc_next_trait_solver[c1d5e55899188338]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate>, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  31:     0x78a95bff4f62 - <rustc_next_trait_solver[c1d5e55899188338]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[4ac552fdfe0abeba]::solve::delegate::SolverDelegate, rustc_middle[647cd99ec441dfa7]::ty::context::TyCtxt>>::evaluate_goal_raw
  32:     0x78a95bfedefa - rustc_trait_selection[4ac552fdfe0abeba]::traits::coherence::overlap
  33:     0x78a95b418499 - <rustc_middle[647cd99ec441dfa7]::traits::specialization_graph::Children as rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph::ChildrenExt>::insert
  34:     0x78a95c2c3075 - <rustc_middle[647cd99ec441dfa7]::traits::specialization_graph::Graph as rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph::GraphExt>::insert
  35:     0x78a95b5f4c50 - rustc_trait_selection[4ac552fdfe0abeba]::traits::specialize::specialization_graph_provider
  36:     0x78a95b5f49a1 - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::specialization_graph_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 8usize]>>
  37:     0x78a95b820fb5 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefIdCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  38:     0x78a95c2331e8 - rustc_query_impl[baa7e9e66730a851]::query_impl::specialization_graph_of::get_query_incr::__rust_end_short_backtrace
  39:     0x78a95baab290 - rustc_hir_analysis[e35026f032d6c888]::coherence::coherent_trait
  40:     0x78a95baaafef - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::coherent_trait::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  41:     0x78a95b816b72 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefIdCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  42:     0x78a95bb7d9e0 - rustc_query_impl[baa7e9e66730a851]::query_impl::coherent_trait::get_query_incr::__rust_end_short_backtrace
  43:     0x78a958f967d5 - rustc_hir_analysis[e35026f032d6c888]::check::wfcheck::check_well_formed
  44:     0x78a95be1f17b - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  45:     0x78a95b81a0d2 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_data_structures[d4cf7d399ba92dfc]::vec_cache::VecCache<rustc_span[3a9ac5c7918c6957]::def_id::LocalDefId, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[e35f56ec1f563ec5]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  46:     0x78a95b81942e - rustc_query_impl[baa7e9e66730a851]::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
  47:     0x78a95be1f3ec - rustc_hir_analysis[e35026f032d6c888]::check::wfcheck::check_mod_type_wf
  48:     0x78a95be1f20b - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>
  49:     0x78a95c38aec1 - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::DefaultCache<rustc_span[3a9ac5c7918c6957]::def_id::LocalModDefId, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  50:     0x78a95c38bbda - rustc_query_impl[baa7e9e66730a851]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  51:     0x78a95b650fdc - rustc_hir_analysis[e35026f032d6c888]::check_crate
  52:     0x78a95b80c23c - rustc_interface[ea487bdd263c790d]::passes::run_required_analyses
  53:     0x78a95c31629e - rustc_interface[ea487bdd263c790d]::passes::analysis
  54:     0x78a95c31626f - rustc_query_impl[baa7e9e66730a851]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[baa7e9e66730a851]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 0usize]>>
  55:     0x78a95c31babc - rustc_query_system[e35f56ec1f563ec5]::query::plumbing::try_execute_query::<rustc_query_impl[baa7e9e66730a851]::DynamicConfig<rustc_query_system[e35f56ec1f563ec5]::query::caches::SingleCache<rustc_middle[647cd99ec441dfa7]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[baa7e9e66730a851]::plumbing::QueryCtxt, true>
  56:     0x78a95c31b315 - rustc_query_impl[baa7e9e66730a851]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  57:     0x78a95c37f61e - rustc_interface[ea487bdd263c790d]::passes::create_and_enter_global_ctxt::<core[5897668cda8e5696]::option::Option<rustc_interface[ea487bdd263c790d]::queries::Linker>, rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  58:     0x78a95c3d4aa8 - rustc_interface[ea487bdd263c790d]::interface::run_compiler::<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}
  59:     0x78a95c2e1c87 - std[da923ce35ba8e93c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[ea487bdd263c790d]::util::run_in_thread_with_globals<rustc_interface[ea487bdd263c790d]::util::run_in_thread_pool_with_globals<rustc_interface[ea487bdd263c790d]::interface::run_compiler<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  60:     0x78a95c2e211c - <<std[da923ce35ba8e93c]::thread::Builder>::spawn_unchecked_<rustc_interface[ea487bdd263c790d]::util::run_in_thread_with_globals<rustc_interface[ea487bdd263c790d]::util::run_in_thread_pool_with_globals<rustc_interface[ea487bdd263c790d]::interface::run_compiler<(), rustc_driver_impl[c20abde1d352895d]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[5897668cda8e5696]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  61:     0x78a95c2e3701 - std::sys::pal::unix::thread::Thread::new::thread_start::h1c08419e700d562f
  62:     0x78a9566a339d - <unknown>
  63:     0x78a95672849c - <unknown>
  64:                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/sigurd/Code/rust/sss/rustc-ice-2024-12-22T03_01_02-3451.txt` to your bug report

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 [specialization_graph_of] building specialization graph of trait `Maybe`
#1 [coherent_trait] coherence checking all impls of trait `Maybe`
#2 [check_well_formed] checking that `<impl at minimum_reproducable_example/src/main.rs:36:1: 38:14>` is well-formed
#3 [check_mod_type_wf] checking that types are well-formed in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack
For more information about this error, try `rustc --explain E0601`.
warning: `minimum_reproducable_example` (bin "minimum_reproducable_example") generated 1 warning
error: could not compile `minimum_reproducable_example` (bin "minimum_reproducable_example") due to 1 previous error; 1 warning emitted
```

### Anything else?

Managed to reproduce this with just the code shown in this report.