Skip to content

ICE: cannot find M/#0 in param-env with feature(min_generic_const_args) #148822

@Filiprogrammer

Description

@Filiprogrammer

Code

#![feature(min_generic_const_args)] struct S<const M: usize>(); impl<const M: usize> S<M> { const N: usize = M; fn f() { let arr = [0; Self::N + 1]; } }

Meta

rustc --version --verbose:

rustc 1.93.0-nightly (29a69716f 2025-11-10) binary: rustc commit-hash: 29a69716f2c0f19b5f9163bb4d8c50fb818cf326 commit-date: 2025-11-10 host: x86_64-unknown-linux-gnu release: 1.93.0-nightly LLVM version: 21.1.5 

Error output

 Compiling ice v0.1.0 (/root/ice) warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes --> src/lib.rs:1:12 | 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: internal compiler error: compiler/rustc_middle/src/ty/sty.rs:373:13: cannot find `M/#0` in param-env: ParamEnv { caller_bounds: [], } thread 'rustc' (1818) panicked at compiler/rustc_middle/src/ty/sty.rs:373:13: Box<dyn Any> stack backtrace: 0: std::panicking::begin_panic::<rustc_errors::ExplicitBug> 1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee 2: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0} 3: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0} 4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !> 5: rustc_middle::util::bug::bug_fmt 6: <rustc_middle::ty::sty::ParamConst>::find_const_ty_from_env.cold 7: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation 8: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor> 9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path 10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_overloaded_binop 12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_binop 13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 14: rustc_hir_typeck::typeck_with_inspect::{closure#0} [... omitted 1 frame ...] 15: rustc_mir_build::thir::pattern::check_match::check_match [... omitted 1 frame ...] 16: rustc_mir_build::builder::build_mir 17: rustc_mir_transform::mir_built [... omitted 2 frames ...] 18: rustc_const_eval::const_eval::eval_queries::eval_to_allocation_raw_provider [... omitted 3 frames ...] 19: rustc_const_eval::const_eval::valtrees::eval_to_valtree [... omitted 3 frames ...] 20: <rustc_middle::ty::context::TyCtxt>::const_eval_resolve_for_typeck 21: rustc_trait_selection::traits::try_evaluate_const 22: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const 23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::normalize::<rustc_middle::ty::consts::Const> 24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_repeat 25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl 27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block 28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 29: rustc_hir_typeck::check::check_fn 30: rustc_hir_typeck::typeck_with_inspect::{closure#0} [... omitted 1 frame ...] 31: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0} 32: rustc_hir_analysis::check_crate 33: rustc_interface::passes::analysis [... omitted 1 frame ...] 34: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0} 35: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. 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 `/root/ice/rustc-ice-2025-11-11T13_43_15-1816.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 [typeck] type-checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #1 [check_match] match-checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #2 [mir_built] building MIR for `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #3 [trivial_const] checking if `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` is a trivial const #4 [eval_to_allocation_raw] const-evaluating + checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #5 [eval_to_valtree] evaluating type-level constant #6 [typeck] type-checking `<impl at src/lib.rs:5:1: 5:26>::f` #7 [analysis] running analysis passes on crate `ice` end of query stack warning: `ice` (lib) generated 1 warning error: could not compile `ice` (lib); 1 warning emitted Caused by: process didn't exit successfully: `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name ice --edition=2024 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=146 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=fc8cb504a78a672c -C extra-filename=-b56d7f645a85bb3c --out-dir /root/ice/target/debug/deps -C incremental=/root/ice/target/debug/incremental -L dependency=/root/ice/target/debug/deps` (exit status: 101) 
Backtrace

thread 'rustc' panicked at compiler/rustc_middle/src/ty/sty.rs:373:13: Box<dyn Any> stack backtrace: 0: 0x7065f0442bfb - std::backtrace::Backtrace::create::hafaf94669ea24c95 1: 0x7065f0442b45 - std::backtrace::Backtrace::force_capture::hbfe82bc594600d40 2: 0x7065ef433922 - std[57120baab0c4212a]::panicking::update_hook::<alloc[acab56ca23872f68]::boxed::Box<rustc_driver_impl[ca3f62e4d362a66]::install_ice_hook::{closure#1}>>::{closure#0} 3: 0x7065f0443b4b - std::panicking::panic_with_hook::h5b602d86eb82e917 4: 0x7065ef46f721 - std[57120baab0c4212a]::panicking::begin_panic::<rustc_errors[737ab891f6db0e86]::ExplicitBug>::{closure#0} 5: 0x7065ef461bc6 - std[57120baab0c4212a]::sys::backtrace::__rust_end_short_backtrace::<std[57120baab0c4212a]::panicking::begin_panic<rustc_errors[737ab891f6db0e86]::ExplicitBug>::{closure#0}, !> 6: 0x7065ef45f319 - std[57120baab0c4212a]::panicking::begin_panic::<rustc_errors[737ab891f6db0e86]::ExplicitBug> 7: 0x7065ef48dd51 - <rustc_errors[737ab891f6db0e86]::diagnostic::BugAbort as rustc_errors[737ab891f6db0e86]::diagnostic::EmissionGuarantee>::emit_producing_guarantee 8: 0x7065efa18cda - rustc_middle[e8e6b99871439450]::util::bug::opt_span_bug_fmt::<rustc_span[3e03a00fbc56e35a]::span_encoding::Span>::{closure#0} 9: 0x7065efa18fba - rustc_middle[e8e6b99871439450]::ty::context::tls::with_opt::<rustc_middle[e8e6b99871439450]::util::bug::opt_span_bug_fmt<rustc_span[3e03a00fbc56e35a]::span_encoding::Span>::{closure#0}, !>::{closure#0} 10: 0x7065efa09dbb - rustc_middle[e8e6b99871439450]::ty::context::tls::with_context_opt::<rustc_middle[e8e6b99871439450]::ty::context::tls::with_opt<rustc_middle[e8e6b99871439450]::util::bug::opt_span_bug_fmt<rustc_span[3e03a00fbc56e35a]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !> 11: 0x7065ed62b5d0 - rustc_middle[e8e6b99871439450]::util::bug::bug_fmt 12: 0x7065f279eb7f - <rustc_middle[e8e6b99871439450]::ty::sty::ParamConst>::find_const_ty_from_env.cold 13: 0x7065f14d527e - <rustc_trait_selection[4d32bb657ddb9e3]::traits::fulfill::FulfillProcessor as rustc_data_structures[b9af66bb2abed04e]::obligation_forest::ObligationProcessor>::process_obligation 14: 0x7065f0c04e09 - <rustc_data_structures[b9af66bb2abed04e]::obligation_forest::ObligationForest<rustc_trait_selection[4d32bb657ddb9e3]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[4d32bb657ddb9e3]::traits::fulfill::FulfillProcessor> 15: 0x7065f1cbfd8a - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_path 16: 0x7065f0eeb6df - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 17: 0x7065f0ef6b3c - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_overloaded_binop 18: 0x7065f0eeafae - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_binop 19: 0x7065f0eec8c0 - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 20: 0x7065f18c8942 - rustc_hir_typeck[d6cb31e3dc140c64]::typeck_with_inspect::{closure#0} 21: 0x7065f18c4586 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>> 22: 0x7065f104d62c - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_data_structures[b9af66bb2abed04e]::vec_cache::VecCache<rustc_span[3e03a00fbc56e35a]::def_id::LocalDefId, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[224051257ecc889d]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 23: 0x7065f104ca43 - rustc_query_impl[3b5b72dcede38a8f]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace 24: 0x7065f14b78ac - rustc_mir_build[d63dcebb09bccafc]::thir::pattern::check_match::check_match 25: 0x7065f14b6c5b - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 1usize]>> 26: 0x7065f0f5b453 - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_data_structures[b9af66bb2abed04e]::vec_cache::VecCache<rustc_span[3e03a00fbc56e35a]::def_id::LocalDefId, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[224051257ecc889d]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 27: 0x7065f0f5d9ad - rustc_query_impl[3b5b72dcede38a8f]::query_impl::check_match::get_query_incr::__rust_end_short_backtrace 28: 0x7065f0feb766 - rustc_mir_build[d63dcebb09bccafc]::builder::build_mir 29: 0x7065f0c09669 - rustc_mir_transform[6222a61865def322]::mir_built 30: 0x7065f0c09625 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>> 31: 0x7065f104d62c - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_data_structures[b9af66bb2abed04e]::vec_cache::VecCache<rustc_span[3e03a00fbc56e35a]::def_id::LocalDefId, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[224051257ecc889d]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 32: 0x7065f0f5d737 - rustc_query_impl[3b5b72dcede38a8f]::query_impl::mir_built::get_query_incr::__rust_end_short_backtrace 33: 0x7065f0d47081 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::trivial_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 32usize]>> 34: 0x7065f103b011 - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefIdCache<rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 35: 0x7065f103a255 - rustc_query_impl[3b5b72dcede38a8f]::query_impl::trivial_const::get_query_incr::__rust_end_short_backtrace 36: 0x7065f119e1a4 - rustc_const_eval[44cde1719d230047]::const_eval::eval_queries::eval_to_allocation_raw_provider 37: 0x7065f119b948 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>> 38: 0x7065f119b901 - <rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2} as core[931262d1e7334bae]::ops::function::FnOnce<(rustc_middle[e8e6b99871439450]::ty::context::TyCtxt, rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>)>>::call_once 39: 0x7065f1a7447b - <rustc_query_system[224051257ecc889d]::query::plumbing::execute_job_incr<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[931262d1e7334bae]::ops::function::FnOnce<((rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>)>>::call_once 40: 0x7065f1a77242 - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 41: 0x7065f1a76aea - rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_allocation_raw::get_query_incr::__rust_end_short_backtrace 42: 0x7065f1a70e84 - rustc_const_eval[44cde1719d230047]::const_eval::valtrees::eval_to_valtree 43: 0x7065f1a70c25 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 16usize]>> 44: 0x7065f1a70337 - <rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[931262d1e7334bae]::ops::function::FnOnce<(rustc_middle[e8e6b99871439450]::ty::context::TyCtxt, rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>)>>::call_once 45: 0x7065f1a7447b - <rustc_query_system[224051257ecc889d]::query::plumbing::execute_job_incr<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[931262d1e7334bae]::ops::function::FnOnce<((rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>)>>::call_once 46: 0x7065f205722e - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::DefaultCache<rustc_middle[e8e6b99871439450]::ty::PseudoCanonicalInput<rustc_middle[e8e6b99871439450]::mir::interpret::GlobalId>, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 47: 0x7065f2056ada - rustc_query_impl[3b5b72dcede38a8f]::query_impl::eval_to_valtree::get_query_incr::__rust_end_short_backtrace 48: 0x7065f0e47738 - <rustc_middle[e8e6b99871439450]::ty::context::TyCtxt>::const_eval_resolve_for_typeck 49: 0x7065f0e463ed - rustc_trait_selection[4d32bb657ddb9e3]::traits::try_evaluate_const 50: 0x7065f0e26ca3 - <rustc_trait_selection[4d32bb657ddb9e3]::traits::normalize::AssocTypeNormalizer as rustc_type_ir[24ec472b020a1f8]::fold::TypeFolder<rustc_middle[e8e6b99871439450]::ty::context::TyCtxt>>::fold_const 51: 0x7065f1d4a14a - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::normalize::<rustc_middle[e8e6b99871439450]::ty::consts::Const> 52: 0x7065f1d4993e - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_repeat 53: 0x7065f0eed0f6 - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 54: 0x7065f0ece7c4 - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_decl 55: 0x7065f0ee2583 - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_block 56: 0x7065f0eeb593 - <rustc_hir_typeck[d6cb31e3dc140c64]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args 57: 0x7065f0e96a8d - rustc_hir_typeck[d6cb31e3dc140c64]::check::check_fn 58: 0x7065f18c5b98 - rustc_hir_typeck[d6cb31e3dc140c64]::typeck_with_inspect::{closure#0} 59: 0x7065f18c4586 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>> 60: 0x7065f104d62c - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_data_structures[b9af66bb2abed04e]::vec_cache::VecCache<rustc_span[3e03a00fbc56e35a]::def_id::LocalDefId, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[224051257ecc889d]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 61: 0x7065f104ca43 - rustc_query_impl[3b5b72dcede38a8f]::query_impl::typeck::get_query_incr::__rust_end_short_backtrace 62: 0x7065f105c3e7 - <rustc_middle[e8e6b99871439450]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[729b31ddc1aa5ee4]::check_crate::{closure#2}>::{closure#0} 63: 0x7065f105b63f - rustc_hir_analysis[729b31ddc1aa5ee4]::check_crate 64: 0x7065f10413f0 - rustc_interface[c03621d5b1c22383]::passes::analysis 65: 0x7065f10410b3 - rustc_query_impl[3b5b72dcede38a8f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3b5b72dcede38a8f]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 0usize]>> 66: 0x7065f1ee6a88 - rustc_query_system[224051257ecc889d]::query::plumbing::try_execute_query::<rustc_query_impl[3b5b72dcede38a8f]::DynamicConfig<rustc_query_system[224051257ecc889d]::query::caches::SingleCache<rustc_middle[e8e6b99871439450]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[3b5b72dcede38a8f]::plumbing::QueryCtxt, true> 67: 0x7065f1ee62ff - rustc_query_impl[3b5b72dcede38a8f]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace 68: 0x7065f1ed6743 - <rustc_interface[c03621d5b1c22383]::passes::create_and_enter_global_ctxt<core[931262d1e7334bae]::option::Option<rustc_interface[c03621d5b1c22383]::queries::Linker>, rustc_driver_impl[ca3f62e4d362a66]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[931262d1e7334bae]::ops::function::FnOnce<(&rustc_session[703a93a40b399499]::session::Session, rustc_middle[e8e6b99871439450]::ty::context::CurrentGcx, alloc[acab56ca23872f68]::sync::Arc<rustc_data_structures[b9af66bb2abed04e]::jobserver::Proxy>, &std[57120baab0c4212a]::sync::once_lock::OnceLock<rustc_middle[e8e6b99871439450]::ty::context::GlobalCtxt>, &rustc_data_structures[b9af66bb2abed04e]::sync::worker_local::WorkerLocal<rustc_middle[e8e6b99871439450]::arena::Arena>, &rustc_data_structures[b9af66bb2abed04e]::sync::worker_local::WorkerLocal<rustc_hir[61f811332afb1283]::Arena>, rustc_driver_impl[ca3f62e4d362a66]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0} 69: 0x7065f1d020e9 - rustc_interface[c03621d5b1c22383]::interface::run_compiler::<(), rustc_driver_impl[ca3f62e4d362a66]::run_compiler::{closure#0}>::{closure#1} 70: 0x7065f1d23a3b - std[57120baab0c4212a]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c03621d5b1c22383]::util::run_in_thread_with_globals<rustc_interface[c03621d5b1c22383]::util::run_in_thread_pool_with_globals<rustc_interface[c03621d5b1c22383]::interface::run_compiler<(), rustc_driver_impl[ca3f62e4d362a66]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()> 71: 0x7065f1d23714 - <<std[57120baab0c4212a]::thread::Builder>::spawn_unchecked_<rustc_interface[c03621d5b1c22383]::util::run_in_thread_with_globals<rustc_interface[c03621d5b1c22383]::util::run_in_thread_pool_with_globals<rustc_interface[c03621d5b1c22383]::interface::run_compiler<(), rustc_driver_impl[ca3f62e4d362a66]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[931262d1e7334bae]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 72: 0x7065f1d20faf - std::sys::thread::unix::Thread::new::thread_start::ha78e80810c140245 73: 0x7065eb69cb7b - <unknown> 74: 0x7065eb71a7b8 - <unknown> 75: 0x0 - <unknown> rustc version: 1.93.0-nightly (29a69716f 2025-11-10) platform: x86_64-unknown-linux-gnu query stack during panic: #0 [typeck] type-checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #1 [check_match] match-checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #2 [mir_built] building MIR for `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #3 [trivial_const] checking if `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` is a trivial const #4 [eval_to_allocation_raw] const-evaluating + checking `<impl at src/lib.rs:5:1: 5:26>::f::{constant#0}` #5 [eval_to_valtree] evaluating type-level constant #6 [typeck] type-checking `<impl at src/lib.rs:5:1: 5:26>::f` #7 [analysis] running analysis passes on crate `ice` end of query stack 

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]`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