Skip to content

ICE: Instance::try_resolve should only be used to resolve instances of functions, statics, and consts; to resolve associated types, use try_normalize_erasing_regions #139596

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
matthiaskrgr opened this issue Apr 9, 2025 · 3 comments
Labels
C-bug Category: This is a bug. F-min_generic_const_args `#![feature(min_generic_const_args)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

#![feature(min_generic_const_args)]
enum Colour {
    R,
    G,
    B,
    W,
}

struct Led<const C: Colour> {}

impl Led<C> {
    pub fn new() -> Led {
        Led::<{ Colour::W }> {}
    }
}

original:

#![feature(adt_const_params)]
#![feature(generic_const_exprs)]
#![feature(generic_arg_infer)]

#[derive(PartialEq, Eq)]
#[allow(dead_code)]
enum Colour {
    R,
    G,
    B,
    W,
}

struct Led<const C: Colour> {}

impl<const C: Colour> Led<C> {
    pub fn new() -> Led<{ Colour::W }> {
        Led::<{ Colour::W }> {}
    }
}

fn main() {
    let l = Led::<_>::new();
}

Version information

rustc 1.88.0-nightly (48f89e765 2025-04-09)
binary: rustc
commit-hash: 48f89e7659678f91a68c0c2d868180a0036ab32d
commit-date: 2025-04-09
host: x86_64-unknown-linux-gnu
release: 1.88.0-nightly
LLVM version: 20.1.2

Possibly related line of code:

pub fn try_resolve(
tcx: TyCtxt<'tcx>,
typing_env: ty::TypingEnv<'tcx>,
def_id: DefId,
args: GenericArgsRef<'tcx>,
) -> Result<Option<Instance<'tcx>>, ErrorGuaranteed> {
assert_matches!(
tcx.def_kind(def_id),
DefKind::Fn
| DefKind::AssocFn
| DefKind::Const
| DefKind::AssocConst
| DefKind::AnonConst

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcrate-attr=feature(min_generic_const_args)

Program output

error[E0412]: cannot find type `C` in this scope
  --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:10:10
   |
10 | impl Led<C> {
   |          ^ not found in this scope
   |
help: you might be missing a type parameter
   |
10 | impl<C> Led<C> {
   |     +++

warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
 --> <crate attribute>:1:9
  |
1 | feature(min_generic_const_args)
  |         ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `mvce`
  --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:14:2
   |
14 | }
   |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs`

error: `Colour` is forbidden as the type of a const generic parameter
 --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:8:21
  |
8 | struct Led<const C: Colour> {}
  |                     ^^^^^^
  |
  = note: the only supported types are integers, `bool`, and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
  |
1 + #![feature(adt_const_params)]
  |

error[E0747]: unresolved item provided when a constant was expected
  --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:10:10
   |
10 | impl Led<C> {
   |          ^
   |
help: if this generic argument was intended as a const parameter, surround it with braces
   |
10 | impl Led<{ C }> {
   |          +   +

error[E0107]: missing generics for struct `Led`
  --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:11:21
   |
11 |     pub fn new() -> Led {
   |                     ^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `C`
  --> /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:8:8
   |
8  | struct Led<const C: Colour> {}
   |        ^^^ ---------------
help: add missing generic argument
   |
11 |     pub fn new() -> Led<C> {
   |                        +++


thread 'rustc' panicked at compiler/rustc_middle/src/ty/instance.rs:488:9:
assertion `left matches right` failed: `Instance::try_resolve` should only be used to resolve instances of functions, statics, and consts; to resolve associated types, use `try_normalize_erasing_regions`.
  left: Ctor(Variant, Const)
 right: DefKind::Fn | DefKind::AssocFn | DefKind::Const | DefKind::AssocConst |
DefKind::AnonConst | DefKind::InlineConst | DefKind::Static { .. } |
DefKind::Ctor(_, CtorKind::Fn) | DefKind::Closure |
DefKind::SyntheticCoroutineBody
stack backtrace:
   0:     0x7ca5f569a5f3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hbda7938ad91daa71
   1:     0x7ca5f5e06091 - core::fmt::write::hfcac35951f31bfd5
   2:     0x7ca5f7221911 - std::io::Write::write_fmt::h69d457bf709d3faa
   3:     0x7ca5f569a452 - std::sys::backtrace::BacktraceLock::print::h05237cc9fabaf381
   4:     0x7ca5f569df3a - std::panicking::default_hook::{{closure}}::hc30470ec32c9e61a
   5:     0x7ca5f569dabf - std::panicking::default_hook::h1a06328d8fcb4b65
   6:     0x7ca5f46f3be3 - std[5a1f1ac0881987ae]::panicking::update_hook::<alloc[80a1e000ee70d0ff]::boxed::Box<rustc_driver_impl[3e4c5d0d05c5c229]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7ca5f569e7b3 - std::panicking::rust_panic_with_hook::ha54ddc764a9f2927
   8:     0x7ca5f569e4aa - std::panicking::begin_panic_handler::{{closure}}::h766080f7c8e9eb7a
   9:     0x7ca5f569aac9 - std::sys::backtrace::__rust_end_short_backtrace::haf576155c2de2f94
  10:     0x7ca5f569e16d - __rustc[10dcd0340a2c482b]::rust_begin_unwind
  11:     0x7ca5f2082630 - core::panicking::panic_fmt::h005ce51f4b5ab7a3
  12:     0x7ca5f40c5fba - core::panicking::assert_failed_inner::h4b65bb9eccf86241
  13:     0x7ca5f4d00a84 - core[4dde9abed1c5489b]::panicking::assert_matches_failed::<rustc_hir[9c43573b07d67dbb]::def::DefKind>
  14:     0x7ca5f62125ef - <rustc_middle[a8ce42bc99515a22]::ty::instance::Instance>::try_resolve
  15:     0x7ca5f68e1695 - <rustc_middle[a8ce42bc99515a22]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  16:     0x7ca5f68e11cc - rustc_trait_selection[9b8f5593c6c1191c]::traits::try_evaluate_const
  17:     0x7ca5f68e0c83 - <rustc_trait_selection[9b8f5593c6c1191c]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[f99837588d296a38]::fold::TypeFolder<rustc_middle[a8ce42bc99515a22]::ty::context::TyCtxt>>::fold_const
  18:     0x7ca5f6250ef7 - <rustc_middle[a8ce42bc99515a22]::ty::Ty as rustc_type_ir[f99837588d296a38]::fold::TypeSuperFoldable<rustc_middle[a8ce42bc99515a22]::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection[9b8f5593c6c1191c]::traits::normalize::AssocTypeNormalizer>
  19:     0x7ca5f60a0a85 - <rustc_hir_typeck[7cddd7bac5f9e6c7]::fn_ctxt::FnCtxt>::normalize::<rustc_middle[a8ce42bc99515a22]::ty::Ty>
  20:     0x7ca5f60dc6df - <rustc_hir_typeck[7cddd7bac5f9e6c7]::fn_ctxt::FnCtxt>::check_struct_path
  21:     0x7ca5f697b00e - <rustc_hir_typeck[7cddd7bac5f9e6c7]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  22:     0x7ca5f69703f7 - <rustc_hir_typeck[7cddd7bac5f9e6c7]::fn_ctxt::FnCtxt>::check_expr_block
  23:     0x7ca5f6977dfe - <rustc_hir_typeck[7cddd7bac5f9e6c7]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  24:     0x7ca5f60b5084 - rustc_hir_typeck[7cddd7bac5f9e6c7]::check::check_fn
  25:     0x7ca5f60a259a - rustc_hir_typeck[7cddd7bac5f9e6c7]::typeck_with_inspect::{closure#0}
  26:     0x7ca5f60a12b6 - rustc_query_impl[304b34704ffb34a2]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[304b34704ffb34a2]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a8ce42bc99515a22]::query::erase::Erased<[u8; 8usize]>>
  27:     0x7ca5f607c66c - rustc_query_system[9941410aea4cdd96]::query::plumbing::try_execute_query::<rustc_query_impl[304b34704ffb34a2]::DynamicConfig<rustc_data_structures[7aca4433282a48ef]::vec_cache::VecCache<rustc_span[a10dda05a280b721]::def_id::LocalDefId, rustc_middle[a8ce42bc99515a22]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[9941410aea4cdd96]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[304b34704ffb34a2]::plumbing::QueryCtxt, false>
  28:     0x7ca5f607c0cb - rustc_query_impl[304b34704ffb34a2]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  29:     0x7ca5f607ac7e - rustc_hir_analysis[6987030d2b35bee6]::check_crate
  30:     0x7ca5f68277e3 - rustc_interface[145e5df1fb885f40]::passes::run_required_analyses
  31:     0x7ca5f6e2f09e - rustc_interface[145e5df1fb885f40]::passes::analysis
  32:     0x7ca5f6e2f073 - rustc_query_impl[304b34704ffb34a2]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[304b34704ffb34a2]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a8ce42bc99515a22]::query::erase::Erased<[u8; 0usize]>>
  33:     0x7ca5f6dc42fd - rustc_query_system[9941410aea4cdd96]::query::plumbing::try_execute_query::<rustc_query_impl[304b34704ffb34a2]::DynamicConfig<rustc_query_system[9941410aea4cdd96]::query::caches::SingleCache<rustc_middle[a8ce42bc99515a22]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[304b34704ffb34a2]::plumbing::QueryCtxt, false>
  34:     0x7ca5f6dc3ff8 - rustc_query_impl[304b34704ffb34a2]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7ca5f714f54b - rustc_interface[145e5df1fb885f40]::passes::create_and_enter_global_ctxt::<core[4dde9abed1c5489b]::option::Option<rustc_interface[145e5df1fb885f40]::queries::Linker>, rustc_driver_impl[3e4c5d0d05c5c229]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  36:     0x7ca5f6f49c39 - rustc_interface[145e5df1fb885f40]::interface::run_compiler::<(), rustc_driver_impl[3e4c5d0d05c5c229]::run_compiler::{closure#0}>::{closure#1}
  37:     0x7ca5f6f1f945 - std[5a1f1ac0881987ae]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[145e5df1fb885f40]::util::run_in_thread_with_globals<rustc_interface[145e5df1fb885f40]::util::run_in_thread_pool_with_globals<rustc_interface[145e5df1fb885f40]::interface::run_compiler<(), rustc_driver_impl[3e4c5d0d05c5c229]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  38:     0x7ca5f6f2022b - <<std[5a1f1ac0881987ae]::thread::Builder>::spawn_unchecked_<rustc_interface[145e5df1fb885f40]::util::run_in_thread_with_globals<rustc_interface[145e5df1fb885f40]::util::run_in_thread_pool_with_globals<rustc_interface[145e5df1fb885f40]::interface::run_compiler<(), rustc_driver_impl[3e4c5d0d05c5c229]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[4dde9abed1c5489b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7ca5f6f21637 - std::sys::pal::unix::thread::Thread::new::thread_start::hd9ac46f49686eea4
  40:     0x7ca5f0c4e70a - <unknown>
  41:     0x7ca5f0cd2aac - <unknown>
  42:                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: rustc 1.88.0-nightly (48f89e765 2025-04-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=feature(min_generic_const_args) -Z dump-mir-dir=dir

query stack during panic:
#0 [typeck] type-checking `<impl at /tmp/icemaker_global_tempdir.z28WUAJGFSOZ/rustc_testrunner_tmpdir_reporting.d34pcMyh8VAF/mvce.rs:10:1: 10:12>::new`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 5 previous errors; 1 warning emitted

Some errors have detailed explanations: E0107, E0412, E0601, E0747.
For more information about an error, try `rustc --explain E0107`.

@rustbot label +F-min_generic_const_args

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 9, 2025
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. F-min_generic_const_args `#![feature(min_generic_const_args)]` labels Apr 9, 2025
@matthiaskrgr
Copy link
Member Author

bisects to #135186

@cyrgani
Copy link
Contributor

cyrgani commented Apr 9, 2025

#![feature(min_generic_const_args)]
struct Colour;

struct Led<const C: Colour>;

fn main() {
    Led::<{ Colour}>;
}

@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 9, 2025
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label May 2, 2025
@matthiaskrgr
Copy link
Member Author

updated stacktrace for findability

thread 'rustc' panicked at compiler/rustc_trait_selection/src/traits/normalize.rs:456:21:
internal error: entered unreachable code: unexpected `DefKind` for const alias to resolve to: Ctor(Struct, Const)
stack backtrace:
   0:     0x776d84f70313 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hba0ac3ebdec0302b
   1:     0x776d85605a77 - core::fmt::write::h752296e6eed1df48
   2:     0x776d866743d1 - std::io::Write::write_fmt::hdc67b8a1ae47802e
   3:     0x776d84f70172 - std::sys::backtrace::BacktraceLock::print::h9ae2627f939f6ec0
   4:     0x776d84f73d6a - std::panicking::default_hook::{{closure}}::h5c801bbbd3f53c67
   5:     0x776d84f738ef - std::panicking::default_hook::h0008735e4736e9d8
   6:     0x776d83f9ee53 - std[133919d7d3a6330f]::panicking::update_hook::<alloc[c99951aa3f586c72]::boxed::Box<rustc_driver_impl[10500345609cea4c]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x776d84f745e3 - std::panicking::rust_panic_with_hook::h3622abb623658084
   8:     0x776d84f742da - std::panicking::begin_panic_handler::{{closure}}::h197cfb5dea60202a
   9:     0x776d84f707e9 - std::sys::backtrace::__rust_end_short_backtrace::hb5fe5e7c5b61ed51
  10:     0x776d84f73f9d - __rustc[c9acd4f00d26d045]::rust_begin_unwind
  11:     0x776d81888840 - core::panicking::panic_fmt::h8d16370d7cdeaf7b
  12:     0x776d85c173de - <rustc_trait_selection[f0b7fb50d09f1769]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[1d950c0e965b2437]::fold::TypeFolder<rustc_middle[dff9d88dfdad334f]::ty::context::TyCtxt>>::fold_const
  13:     0x776d85784a17 - <&rustc_middle[dff9d88dfdad334f]::ty::list::RawList<(), rustc_middle[dff9d88dfdad334f]::ty::generic_args::GenericArg> as rustc_type_ir[1d950c0e965b2437]::fold::TypeFoldable<rustc_middle[dff9d88dfdad334f]::ty::context::TyCtxt>>::fold_with::<rustc_trait_selection[f0b7fb50d09f1769]::traits::normalize::AssocTypeNormalizer>
  14:     0x776d8583b358 - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::normalize::<&rustc_middle[dff9d88dfdad334f]::ty::list::RawList<(), rustc_middle[dff9d88dfdad334f]::ty::generic_args::GenericArg>>
  15:     0x776d860173c3 - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::instantiate_value_path
  16:     0x776d8600c22b - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::check_expr_path
  17:     0x776d863638d5 - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  18:     0x776d81d479b3 - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::check_expr_block
  19:     0x776d86366127 - <rustc_hir_typeck[352521e795693c79]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  20:     0x776d85c53da5 - rustc_hir_typeck[352521e795693c79]::check::check_fn
  21:     0x776d85c3e911 - rustc_hir_typeck[352521e795693c79]::typeck_with_inspect::{closure#0}
  22:     0x776d85c3d5f6 - rustc_query_impl[4420b9e2a7c28e02]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4420b9e2a7c28e02]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dff9d88dfdad334f]::query::erase::Erased<[u8; 8usize]>>
  23:     0x776d8587bca6 - rustc_query_system[41b8b83874433c09]::query::plumbing::try_execute_query::<rustc_query_impl[4420b9e2a7c28e02]::DynamicConfig<rustc_data_structures[dfab23b0afac8e70]::vec_cache::VecCache<rustc_span[b0398d7b924b4ee4]::def_id::LocalDefId, rustc_middle[dff9d88dfdad334f]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[41b8b83874433c09]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[4420b9e2a7c28e02]::plumbing::QueryCtxt, false>
  24:     0x776d8587b712 - rustc_query_impl[4420b9e2a7c28e02]::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
  25:     0x776d85877016 - rustc_hir_analysis[a499f4639d182f46]::check_crate
  26:     0x776d85878005 - rustc_interface[2fac01c4f50d99ab]::passes::run_required_analyses
  27:     0x776d86404e9e - rustc_interface[2fac01c4f50d99ab]::passes::analysis
  28:     0x776d86404e75 - rustc_query_impl[4420b9e2a7c28e02]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[4420b9e2a7c28e02]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dff9d88dfdad334f]::query::erase::Erased<[u8; 0usize]>>
  29:     0x776d86406f7a - rustc_query_system[41b8b83874433c09]::query::plumbing::try_execute_query::<rustc_query_impl[4420b9e2a7c28e02]::DynamicConfig<rustc_query_system[41b8b83874433c09]::query::caches::SingleCache<rustc_middle[dff9d88dfdad334f]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[4420b9e2a7c28e02]::plumbing::QueryCtxt, false>
  30:     0x776d86406c4f - rustc_query_impl[4420b9e2a7c28e02]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  31:     0x776d86571747 - rustc_interface[2fac01c4f50d99ab]::passes::create_and_enter_global_ctxt::<core[636426708046f2b5]::option::Option<rustc_interface[2fac01c4f50d99ab]::queries::Linker>, rustc_driver_impl[10500345609cea4c]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  32:     0x776d866d1d26 - rustc_interface[2fac01c4f50d99ab]::interface::run_compiler::<(), rustc_driver_impl[10500345609cea4c]::run_compiler::{closure#0}>::{closure#1}
  33:     0x776d8666eac6 - std[133919d7d3a6330f]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2fac01c4f50d99ab]::util::run_in_thread_with_globals<rustc_interface[2fac01c4f50d99ab]::util::run_in_thread_pool_with_globals<rustc_interface[2fac01c4f50d99ab]::interface::run_compiler<(), rustc_driver_impl[10500345609cea4c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  34:     0x776d8666e76b - <<std[133919d7d3a6330f]::thread::Builder>::spawn_unchecked_<rustc_interface[2fac01c4f50d99ab]::util::run_in_thread_with_globals<rustc_interface[2fac01c4f50d99ab]::util::run_in_thread_pool_with_globals<rustc_interface[2fac01c4f50d99ab]::interface::run_compiler<(), rustc_driver_impl[10500345609cea4c]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[636426708046f2b5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  35:     0x776d8667027d - std::sys::pal::unix::thread::Thread::new::thread_start::hee399e8d427a409c
  36:     0x776d804a57eb - <unknown>
  37:     0x776d8052918c - <unknown>
  38:                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/matthias/vcs/github/rust/tests/crashes/rustc-ice-2025-05-20T21_03_21-449301.txt` to your bug report

query stack during panic:
#0 [typeck] type-checking `main`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 1 previous error; 1 warning emitted

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. F-min_generic_const_args `#![feature(min_generic_const_args)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants