Skip to content

[ICE]: next solver const FnOnce bound on enum variant constructor hits fn_is_const debug assertion #158188

Closed

Description

@Randl

As discovered in #156216
The following debug assertion fails:

fn fn_is_const(self, def_id: DefId) -> bool {
debug_assert_matches!(
self.def_kind(def_id),
DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(CtorOf::Struct, CtorKind::Fn)
);
self.is_conditionally_const(def_id)
}

Code

//@ needs-rustc-debug-assertions
//@ compile-flags: -Znext-solver=globally

#![feature(const_destruct, const_trait_impl)]

use std::marker::Destruct;

const fn impls_fn_once<F: [const] FnOnce(u32) -> Enum + [const] Destruct>(_: F) {}

enum Enum {
    Variant(u32),
}

const fn test() {
    impls_fn_once(Enum::Variant);
}

fn main() {}

Possibly, the debug_assert should be more general, e.g., DefKind::Ctor(_, CtorKind::Fn)?

Meta

Current main

Error output

thread 'rustc' (13393956) panicked at compiler/rustc_middle/src/ty/context/impl_interner.rs:438:9:
assertion `left matches right` failed
  left: Ctor(Variant, Fn)
 right: DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(CtorOf::Struct, CtorKind::Fn)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Backtrace

stack backtrace:
   0:        0x111919cb4 - std[1ce0a825a013fcd]::backtrace_rs::backtrace::libunwind::trace
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
   1:        0x111919cb4 - std[1ce0a825a013fcd]::backtrace_rs::backtrace::trace_unsynchronized::<std[1ce0a825a013fcd]::sys::backtrace::_print_fmt::{closure#1}>
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
   2:        0x111919cb4 - std[1ce0a825a013fcd]::sys::backtrace::_print_fmt
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:74:9
   3:        0x111919cb4 - <<std[1ce0a825a013fcd]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[b967429200c06b0d]::fmt::Display>::fmt
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:44:26
   4:        0x11195925c - <core[b967429200c06b0d]::fmt::rt::Argument>::fmt
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/fmt/rt.rs:152:76
   5:        0x11195925c - core[b967429200c06b0d]::fmt::write
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/fmt/mod.rs:1687:22
   6:        0x111929738 - std[1ce0a825a013fcd]::io::default_write_fmt::<std[1ce0a825a013fcd]::sys::stdio::unix::Stderr>
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/io/mod.rs:622:11
   7:        0x111929738 - <std[1ce0a825a013fcd]::sys::stdio::unix::Stderr as std[1ce0a825a013fcd]::io::Write>::write_fmt
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/io/mod.rs:1977:13
   8:        0x1118f2484 - <std[1ce0a825a013fcd]::sys::backtrace::BacktraceLock>::print
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:47:25
   9:        0x1118f2484 - std[1ce0a825a013fcd]::panicking::default_hook::{closure#0}
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:292:27
  10:        0x11190df8c - std[1ce0a825a013fcd]::panicking::default_hook
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:319:9
  11:        0x10e3babe8 - <alloc[ab2eb6921e729f9a]::boxed::Box<rustc_driver_impl[7e8c17ab34fd2f70]::install_ice_hook::{closure#1}> as core[b967429200c06b0d]::ops::function::Fn<(&dyn for<'a, 'b> core[b967429200c06b0d]::ops::function::Fn<(&'a std[1ce0a825a013fcd]::panic::PanicHookInfo<'b>,), Output = ()> + core[b967429200c06b0d]::marker::Sync + core[b967429200c06b0d]::marker::Send, &std[1ce0a825a013fcd]::panic::PanicHookInfo)>>::call
  12:        0x11190e2f0 - <alloc[ab2eb6921e729f9a]::boxed::Box<dyn for<'a, 'b> core[b967429200c06b0d]::ops::function::Fn<(&'a std[1ce0a825a013fcd]::panic::PanicHookInfo<'b>,), Output = ()> + core[b967429200c06b0d]::marker::Sync + core[b967429200c06b0d]::marker::Send> as core[b967429200c06b0d]::ops::function::Fn<(&std[1ce0a825a013fcd]::panic::PanicHookInfo,)>>::call
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/alloc/src/boxed.rs:2289:9
  13:        0x11190e2f0 - std[1ce0a825a013fcd]::panicking::panic_with_hook
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:833:13
  14:        0x1118f2518 - std[1ce0a825a013fcd]::panicking::panic_handler::{closure#0}
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:698:13
  15:        0x1118e6f14 - std[1ce0a825a013fcd]::sys::backtrace::__rust_end_short_backtrace::<std[1ce0a825a013fcd]::panicking::panic_handler::{closure#0}, !>
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/backtrace.rs:182:18
  16:        0x1118f37fc - __rustc[78fecf9cf3d67ec5]::rust_begin_unwind
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/panicking.rs:689:5
  17:        0x111b30318 - core[b967429200c06b0d]::panicking::panic_fmt
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/core/src/panicking.rs:80:14
  18:        0x111b30218 - core[b967429200c06b0d]::panicking::assert_failed_inner
  19:        0x111ad9aa0 - core[b967429200c06b0d]::panicking::assert_matches_failed::<rustc_hir[4bdb5be531dce398]::def::DefKind>
  20:        0x1112d8834 - <rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt as rustc_type_ir[9b0c4a8306d8d685]::interner::Interner>::fn_is_const
  21:        0x110a8ebb0 - rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::assembly::structural_traits::extract_fn_def_from_const_callable::<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>
  22:        0x110859fa8 - <rustc_type_ir[9b0c4a8306d8d685]::predicate::HostEffectPredicate<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt> as rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::assembly::GoalKind<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::consider_builtin_fn_trait_candidates
  23:        0x1109e0e00 - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::assemble_and_evaluate_candidates::<rustc_type_ir[9b0c4a8306d8d685]::predicate::HostEffectPredicate<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>
  24:        0x1109f20ec - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::compute_host_effect_goal
  25:        0x110989ba4 - <rustc_infer[528c6f51031845d]::infer::InferCtxt as rustc_type_ir[9b0c4a8306d8d685]::infer_ctxt::InferCtxtLike>::enter_forall_without_assumptions::<rustc_type_ir[9b0c4a8306d8d685]::predicate_kind::PredicateKind<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>, core[b967429200c06b0d]::result::Result<rustc_type_ir[9b0c4a8306d8d685]::canonical::Canonical<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt, rustc_type_ir[9b0c4a8306d8d685]::solve::Response<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>, rustc_type_ir[9b0c4a8306d8d685]::solve::NoSolutionOrRerunNonErased>, <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::enter_forall_with_assumptions<rustc_type_ir[9b0c4a8306d8d685]::predicate_kind::PredicateKind<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>, core[b967429200c06b0d]::result::Result<rustc_type_ir[9b0c4a8306d8d685]::canonical::Canonical<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt, rustc_type_ir[9b0c4a8306d8d685]::solve::Response<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>, rustc_type_ir[9b0c4a8306d8d685]::solve::NoSolutionOrRerunNonErased>, <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::compute_goal::{closure#0}>::{closure#0}>
  26:        0x1109d5c80 - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::enter_canonical::<rustc_type_ir[9b0c4a8306d8d685]::canonical::Canonical<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt, rustc_type_ir[9b0c4a8306d8d685]::solve::Response<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>, <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate> as rustc_type_ir[9b0c4a8306d8d685]::search_graph::Delegate>::compute_goal::{closure#0}::{closure#0}>
  27:        0x11075a4d4 - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate> as rustc_type_ir[9b0c4a8306d8d685]::search_graph::Delegate>::compute_goal
  28:        0x110922d64 - <rustc_type_ir[9b0c4a8306d8d685]::search_graph::SearchGraph<rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate>, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::evaluate_goal_in_task
  29:        0x110894d2c - <rustc_middle[fb8a717964f1b9e1]::dep_graph::graph::DepGraph>::with_anon_task::<<rustc_type_ir[9b0c4a8306d8d685]::search_graph::SearchGraph<rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate>, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}::{closure#2}, rustc_type_ir[9b0c4a8306d8d685]::search_graph::EvaluationResult<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>
  30:        0x110a75494 - <rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt as rustc_type_ir[9b0c4a8306d8d685]::search_graph::Cx>::with_cached_task::<rustc_type_ir[9b0c4a8306d8d685]::search_graph::EvaluationResult<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>, <rustc_type_ir[9b0c4a8306d8d685]::search_graph::SearchGraph<rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate>, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::evaluate_goal::{closure#0}::{closure#2}>
  31:        0x110922018 - <rustc_type_ir[9b0c4a8306d8d685]::search_graph::SearchGraph<rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::search_graph::SearchGraphDelegate<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate>, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::evaluate_goal
  32:        0x111a9bd48 - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::evaluate_goal_cold
  33:        0x10e981844 - <rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::EvalCtxt<rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate, rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>>::enter_root::<core[b967429200c06b0d]::result::Result<rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::GoalEvaluation<rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>, rustc_type_ir[9b0c4a8306d8d685]::solve::NoSolutionOrRerunNonErased>, <rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate as rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal::{closure#0}::{closure#0}>
  34:        0x10e9423a4 - <rustc_trait_selection[8fa5927f71b952d2]::solve::delegate::SolverDelegate as rustc_next_trait_solver[3c8adfc38c5f4ea3]::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal
  35:        0x10e9fa9bc - <rustc_trait_selection[8fa5927f71b952d2]::solve::fulfill::FulfillmentCtxt<rustc_trait_selection[8fa5927f71b952d2]::traits::FulfillmentError> as rustc_infer[528c6f51031845d]::traits::engine::TraitEngine<rustc_trait_selection[8fa5927f71b952d2]::traits::FulfillmentError>>::try_evaluate_obligations
  36:        0x10e951600 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::select_obligations_where_possible::<<rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::drain_stalled_coroutine_obligations::{closure#0}>
  37:        0x10ead7648 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_argument_types
  38:        0x10eaa6ff0 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::confirm_builtin_call
  39:        0x10ea9a4f8 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_kind
  40:        0x10eaa48e0 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  41:        0x10eaa3274 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  42:        0x10ead375c - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_stmt
  43:        0x10e94fec0 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::with_breakable_ctxt::<<rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_block::{closure#0}, ()>
  44:        0x10ead612c - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_block
  45:        0x10ea93cf4 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_kind
  46:        0x10eaa48e0 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  47:        0x10eaa3274 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_expr_with_expectation
  48:        0x10eaa3084 - <rustc_hir_typeck[9025aa888ac6a431]::fn_ctxt::FnCtxt>::check_return_or_body_tail
  49:        0x10eb23a78 - rustc_hir_typeck[9025aa888ac6a431]::check::check_fn
  50:        0x10e915528 - rustc_hir_typeck[9025aa888ac6a431]::typeck_with_inspect
  51:        0x11037bbbc - rustc_query_impl[75094af3ccb0fdfe]::query_impl::typeck_root::invoke_provider_fn::__rust_begin_short_backtrace
  52:        0x1100b25d4 - <std[1ce0a825a013fcd]::thread::local::LocalKey<core[b967429200c06b0d]::cell::Cell<*const ()>>>::with::<rustc_middle[fb8a717964f1b9e1]::ty::context::tls::enter_context<rustc_query_impl[75094af3ccb0fdfe]::execution::execute_job_non_incr<rustc_data_structures[e14fd4341785b445]::vec_cache::VecCache<rustc_span[69e7262c8bde4254]::def_id::LocalDefId, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 8usize]>, rustc_middle[fb8a717964f1b9e1]::dep_graph::graph::DepNodeIndex>>::{closure#0}, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 8usize]>>::{closure#0}, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 8usize]>>
  53:        0x110140210 - rustc_query_impl[75094af3ccb0fdfe]::execution::try_execute_query::<rustc_data_structures[e14fd4341785b445]::vec_cache::VecCache<rustc_span[69e7262c8bde4254]::def_id::LocalDefId, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 8usize]>, rustc_middle[fb8a717964f1b9e1]::dep_graph::graph::DepNodeIndex>, false>
  54:        0x11002b494 - rustc_query_impl[75094af3ccb0fdfe]::query_impl::typeck_root::execute_query_non_incr::__rust_end_short_backtrace
  55:        0x10ec651f4 - <rustc_middle[fb8a717964f1b9e1]::query::plumbing::TyCtxtEnsureOk>::typeck::<rustc_span[69e7262c8bde4254]::def_id::LocalDefId>
  56:        0x10ebf4b00 - <rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[892c4a20b7fa347f]::check_crate::{closure#1}>::{closure#0}
  57:        0x10ebf2318 - rustc_data_structures[e14fd4341785b445]::sync::parallel::par_for_each_in::<&rustc_span[69e7262c8bde4254]::def_id::LocalDefId, &[rustc_span[69e7262c8bde4254]::def_id::LocalDefId], <rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis[892c4a20b7fa347f]::check_crate::{closure#1}>::{closure#0}>
  58:        0x10ed2e44c - rustc_hir_analysis[892c4a20b7fa347f]::check_crate
  59:        0x10e5f8b9c - rustc_interface[823b1477660d2a98]::passes::analysis
  60:        0x10fffe724 - rustc_query_impl[75094af3ccb0fdfe]::query_impl::analysis::invoke_provider_fn::__rust_begin_short_backtrace
  61:        0x1100b3044 - <std[1ce0a825a013fcd]::thread::local::LocalKey<core[b967429200c06b0d]::cell::Cell<*const ()>>>::with::<rustc_middle[fb8a717964f1b9e1]::ty::context::tls::enter_context<rustc_query_impl[75094af3ccb0fdfe]::execution::execute_job_non_incr<rustc_middle[fb8a717964f1b9e1]::query::caches::SingleCache<rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 0usize]>>>::{closure#0}, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 0usize]>>::{closure#0}, rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 0usize]>>
  62:        0x11015d984 - rustc_query_impl[75094af3ccb0fdfe]::execution::try_execute_query::<rustc_middle[fb8a717964f1b9e1]::query::caches::SingleCache<rustc_middle[fb8a717964f1b9e1]::query::erase::ErasedData<[u8; 0usize]>>, false>
  63:        0x1100552c8 - rustc_query_impl[75094af3ccb0fdfe]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
  64:        0x10e40f3f8 - <std[1ce0a825a013fcd]::thread::local::LocalKey<core[b967429200c06b0d]::cell::Cell<*const ()>>>::with::<rustc_middle[fb8a717964f1b9e1]::ty::context::tls::enter_context<<rustc_middle[fb8a717964f1b9e1]::ty::context::GlobalCtxt>::enter<rustc_interface[823b1477660d2a98]::passes::create_and_enter_global_ctxt<core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>, rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>>::{closure#1}, core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>>::{closure#0}, core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>>
  65:        0x10e419420 - <rustc_middle[fb8a717964f1b9e1]::ty::context::TyCtxt>::create_global_ctxt::<core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>, rustc_interface[823b1477660d2a98]::passes::create_and_enter_global_ctxt<core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>, rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
  66:        0x10e4304f8 - rustc_interface[823b1477660d2a98]::passes::create_and_enter_global_ctxt::<core[b967429200c06b0d]::option::Option<rustc_interface[823b1477660d2a98]::queries::Linker>, rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}::{closure#2}>
  67:        0x10e42d554 - <scoped_tls[46a3bba04c741f38]::ScopedKey<rustc_span[69e7262c8bde4254]::SessionGlobals>>::set::<rustc_interface[823b1477660d2a98]::util::run_in_thread_with_globals<rustc_interface[823b1477660d2a98]::util::run_in_thread_pool_with_globals<rustc_interface[823b1477660d2a98]::interface::run_compiler<(), rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
  68:        0x10e411608 - rustc_span[69e7262c8bde4254]::create_session_globals_then::<(), rustc_interface[823b1477660d2a98]::util::run_in_thread_with_globals<rustc_interface[823b1477660d2a98]::util::run_in_thread_pool_with_globals<rustc_interface[823b1477660d2a98]::interface::run_compiler<(), rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
  69:        0x10e398bbc - std[1ce0a825a013fcd]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[823b1477660d2a98]::util::run_in_thread_with_globals<rustc_interface[823b1477660d2a98]::util::run_in_thread_pool_with_globals<rustc_interface[823b1477660d2a98]::interface::run_compiler<(), rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  70:        0x10e43e7a8 - <std[1ce0a825a013fcd]::thread::lifecycle::spawn_unchecked<rustc_interface[823b1477660d2a98]::util::run_in_thread_with_globals<rustc_interface[823b1477660d2a98]::util::run_in_thread_pool_with_globals<rustc_interface[823b1477660d2a98]::interface::run_compiler<(), rustc_driver_impl[7e8c17ab34fd2f70]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[b967429200c06b0d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  71:        0x11191759c - <alloc[ab2eb6921e729f9a]::boxed::Box<dyn core[b967429200c06b0d]::ops::function::FnOnce<(), Output = ()> + core[b967429200c06b0d]::marker::Send> as core[b967429200c06b0d]::ops::function::FnOnce<()>>::call_once
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/alloc/src/boxed.rs:2275:9
  72:        0x11191759c - <std[1ce0a825a013fcd]::sys::thread::unix::Thread>::new::thread_start
                               at /rustc/0417c25868d6dfbd1c291dfeae950504faa6f790/library/std/src/sys/thread/unix.rs:118:17
  73:        0x183675c58 - __pthread_cond_wait

error: the compiler unexpectedly panicked. This is a bug

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Jun 20, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 20, 2026
  3. oli-obk commented on Jun 21, 2026

    @oli-obk
    Contributor

    Yea that assert should def handle variant ctors, too.

  4. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 21, 2026
  5. added 2 commits that reference this issue on Jun 21, 2026
  6. deleted a comment from ipezygj on Jun 21, 2026
  7. added a commit that references this issue on Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.F-const_trait_impl`#![feature(const_trait_impl)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions