Skip to content

generic_const_exprs in dependency can cause compiler panic #128525

Open
@italicsjenga

Description

This happened when a crate, which doesn't declare #![feature(generic_const_exprs)], calls a method from a dependency that does use this feature - but only when the method is part of a trait and isn't implemented for a specific const value.

Adding #![feature(generic_const_exprs)] to the binary I was building fixed the issue.

This seems to have been introduced at 8d6705c.

Code

I've uploaded a more complete reproduction here.

binary's main.rs contains:

use library::*;

fn main() {
    let mut inner = ImplementsTraitOverConstGeneric::<4>;

    // if we don't call this function then it'll compile fine
    inner.configure(&Config {
        config: [0, 0, 0, 0],
    });
}

library's lib.rs contains:

#![feature(generic_const_exprs)]

pub trait LibTrait {
    const NUM: usize;

    fn configure(&mut self, cfg: &Config<{ Self::NUM }>);
}

pub struct Config<const N: usize> {
    pub config: [u8; N],
}

pub struct ImplementsTraitOverConstGeneric<const N: usize>;

// this would work if it implemented LibTrait for a specific value of N
impl<const N: usize> LibTrait for ImplementsTraitOverConstGeneric<N> {
    const NUM: usize = N;

    fn configure(&mut self, _: &Config<{ Self::NUM }>) {}
}

Meta

rustc --version --verbose:

rustc 1.82.0-nightly (8e86c9567 2024-08-01)
binary: rustc
commit-hash: 8e86c9567154dc5a9ada15ab196d23eae2bd7d89
commit-date: 2024-08-01
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0

Error output

Backtrace

thread 'rustc' panicked at compiler/rustc_middle/src/ty/sty.rs:362:36:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7e334814db85 - std::backtrace_rs::backtrace::libunwind::trace::he590f1d8e1a82ab4
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x7e334814db85 - std::backtrace_rs::backtrace::trace_unsynchronized::h331bdd463c6aa109
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7e334814db85 - std::backtrace::Backtrace::create::hbdefa5cc899479ed
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/backtrace.rs:331:13
   3:     0x7e334814dad5 - std::backtrace::Backtrace::force_capture::h4ba25855096d1939
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/backtrace.rs:312:9
   4:     0x7e33446b18be - std[b57f06e4736cb22c]::panicking::update_hook::<alloc[c44da2559578ab1c]::boxed::Box<rustc_driver_impl[fc56c8cda95d3675]::install_ice_hook::{closure#0}>>::{closure#0}
   5:     0x7e3348169302 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1425bb2bf83d2783
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/alloc/src/boxed.rs:2162:9
   6:     0x7e3348169302 - std::panicking::rust_panic_with_hook::h0ef563634940a20c
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/panicking.rs:805:13
   7:     0x7e3348168f83 - std::panicking::begin_panic_handler::{{closure}}::h1b89abbc4e2d64a4
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/panicking.rs:664:13
   8:     0x7e3348166609 - std::sys::backtrace::__rust_end_short_backtrace::h7e38463da708e31a
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/sys/backtrace.rs:170:18
   9:     0x7e3348168c44 - rust_begin_unwind
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/panicking.rs:662:5
  10:     0x7e33481b2843 - core::panicking::panic_fmt::h321e39276830f635
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/core/src/panicking.rs:74:14
  11:     0x7e33481b28cc - core::panicking::panic::h5d3976e57e002824
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/core/src/panicking.rs:148:5
  12:     0x7e33481b2639 - core::option::unwrap_failed::haffab1e8e9b01b0f
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/core/src/option.rs:2017:5
  13:     0x7e3347689726 - <rustc_middle[40f190d45a904326]::ty::sty::ParamConst>::find_ty_from_env.cold
  14:     0x7e3342634be5 - <rustc_trait_selection[dc69123e28a4b11a]::traits::fulfill::FulfillProcessor as rustc_data_structures[84d20abb0728c0ac]::obligation_forest::ObligationProcessor>::process_obligation
  15:     0x7e3345e8bd0b - <rustc_data_structures[84d20abb0728c0ac]::obligation_forest::ObligationForest<rustc_trait_selection[dc69123e28a4b11a]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[dc69123e28a4b11a]::traits::fulfill::FulfillProcessor>
  16:     0x7e3342671a4b - rustc_traits[b923eb2207241a48]::codegen::codegen_select_candidate
  17:     0x7e33462cebf7 - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::codegen_select_candidate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>
  18:     0x7e33462ceae7 - <rustc_query_impl[41544cf145abe956]::query_impl::codegen_select_candidate::dynamic_query::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<(rustc_middle[40f190d45a904326]::ty::context::TyCtxt, (rustc_middle[40f190d45a904326]::ty::ParamEnv, rustc_type_ir[e59b5353dc450a9a]::predicate::TraitRef<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>))>>::call_once
  19:     0x7e33462ceaa9 - <rustc_query_system[bf83f59a80268ab4]::query::plumbing::execute_job_incr<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_type_ir[e59b5353dc450a9a]::binder::Binder<rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_type_ir[e59b5353dc450a9a]::predicate::TraitRef<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<((rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_type_ir[e59b5353dc450a9a]::binder::Binder<rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_type_ir[e59b5353dc450a9a]::predicate::TraitRef<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>, false, false, false>), rustc_type_ir[e59b5353dc450a9a]::binder::Binder<rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_type_ir[e59b5353dc450a9a]::predicate::TraitRef<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>>)>>::call_once
  20:     0x7e33462cd5a7 - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<(rustc_middle[40f190d45a904326]::ty::ParamEnv, rustc_type_ir[e59b5353dc450a9a]::predicate::TraitRef<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>), rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  21:     0x7e33462cc6ca - rustc_query_impl[41544cf145abe956]::query_impl::codegen_select_candidate::get_query_incr::__rust_end_short_backtrace
  22:     0x7e33434741f2 - rustc_ty_utils[a4ae667c06e4148f]::instance::resolve_instance_raw
  23:     0x7e33463386e9 - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::resolve_instance_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 32usize]>>
  24:     0x7e334633b9aa - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<(rustc_span[649ce653f8bbad3e]::def_id::DefId, &rustc_middle[40f190d45a904326]::ty::list::RawList<(), rustc_middle[40f190d45a904326]::ty::generic_args::GenericArg>)>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  25:     0x7e334633a5de - rustc_query_impl[41544cf145abe956]::query_impl::resolve_instance_raw::get_query_incr::__rust_end_short_backtrace
  26:     0x7e3342dbdbc3 - <rustc_middle[40f190d45a904326]::ty::context::TyCtxt>::const_eval_resolve
  27:     0x7e33468941c7 - rustc_const_eval[bc77794621a4f50c]::const_eval::eval_queries::eval_to_allocation_raw_provider
  28:     0x7e3346891fb6 - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>
  29:     0x7e3346891f6f - <rustc_query_impl[41544cf145abe956]::query_impl::eval_to_allocation_raw::dynamic_query::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<(rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>)>>::call_once
  30:     0x7e334688dc31 - <rustc_query_system[bf83f59a80268ab4]::query::plumbing::execute_job_incr<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<((rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>)>>::call_once
  31:     0x7e33468766d7 - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  32:     0x7e3346875e44 - rustc_query_impl[41544cf145abe956]::query_impl::eval_to_allocation_raw::get_query_incr::__rust_end_short_backtrace
  33:     0x7e33468743bd - rustc_const_eval[bc77794621a4f50c]::const_eval::valtrees::eval_to_valtree
  34:     0x7e33468741cd - <rustc_const_eval[bc77794621a4f50c]::provide::{closure#0} as core[5b068f7ad0576a85]::ops::function::FnOnce<(rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>)>>::call_once
  35:     0x7e3346874184 - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::eval_to_valtree::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>
  36:     0x7e3346874145 - <rustc_query_impl[41544cf145abe956]::query_impl::eval_to_valtree::dynamic_query::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<(rustc_middle[40f190d45a904326]::ty::context::TyCtxt, rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>)>>::call_once
  37:     0x7e334688dc31 - <rustc_query_system[bf83f59a80268ab4]::query::plumbing::execute_job_incr<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt>::{closure#2}::{closure#2} as core[5b068f7ad0576a85]::ops::function::FnOnce<((rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>), rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>)>>::call_once
  38:     0x7e33468766d7 - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  39:     0x7e3346d4ae76 - rustc_query_impl[41544cf145abe956]::query_impl::eval_to_valtree::get_query_incr::__rust_end_short_backtrace
  40:     0x7e33465be8aa - rustc_middle[40f190d45a904326]::query::plumbing::query_get_at::<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<rustc_middle[40f190d45a904326]::mir::interpret::GlobalId>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 24usize]>>>
  41:     0x7e33465be31e - <rustc_middle[40f190d45a904326]::ty::context::TyCtxt>::const_eval_global_id_for_typeck
  42:     0x7e33465bd302 - <rustc_middle[40f190d45a904326]::ty::context::TyCtxt>::const_eval_resolve_for_typeck
  43:     0x7e33465bcfca - <rustc_middle[40f190d45a904326]::ty::consts::Const>::eval
  44:     0x7e33465bceb1 - <rustc_trait_selection[dc69123e28a4b11a]::traits::normalize_param_env_or_error::{closure#0}::ConstNormalizer as rustc_type_ir[e59b5353dc450a9a]::fold::TypeFolder<rustc_middle[40f190d45a904326]::ty::context::TyCtxt>>::fold_const
  45:     0x7e334622cdb8 - rustc_trait_selection[dc69123e28a4b11a]::traits::normalize_param_env_or_error
  46:     0x7e3345d91fb8 - rustc_ty_utils[a4ae667c06e4148f]::ty::param_env
  47:     0x7e3345d91c5d - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::param_env::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 8usize]>>
  48:     0x7e3345da1d22 - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefIdCache<rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  49:     0x7e3345da1388 - rustc_query_impl[41544cf145abe956]::query_impl::param_env::get_query_incr::__rust_end_short_backtrace
  50:     0x7e33463e6b16 - rustc_ty_utils[a4ae667c06e4148f]::abi::fn_abi_of_instance
  51:     0x7e33463e51f3 - rustc_query_impl[41544cf145abe956]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[41544cf145abe956]::query_impl::fn_abi_of_instance::dynamic_query::{closure#2}::{closure#0}, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>
  52:     0x7e3345e1410c - rustc_query_system[bf83f59a80268ab4]::query::plumbing::try_execute_query::<rustc_query_impl[41544cf145abe956]::DynamicConfig<rustc_query_system[bf83f59a80268ab4]::query::caches::DefaultCache<rustc_middle[40f190d45a904326]::ty::ParamEnvAnd<(rustc_middle[40f190d45a904326]::ty::instance::Instance, &rustc_middle[40f190d45a904326]::ty::list::RawList<(), rustc_middle[40f190d45a904326]::ty::Ty>)>, rustc_middle[40f190d45a904326]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[41544cf145abe956]::plumbing::QueryCtxt, true>
  53:     0x7e3345e135d7 - rustc_query_impl[41544cf145abe956]::query_impl::fn_abi_of_instance::get_query_incr::__rust_end_short_backtrace
  54:     0x7e3342c2d830 - <rustc_codegen_llvm[223f880d581d8266]::context::CodegenCx as rustc_codegen_ssa[cbebbc2647f36fb0]::traits::declare::PreDefineMethods>::predefine_fn
  55:     0x7e3346aea661 - rustc_codegen_llvm[223f880d581d8266]::base::compile_codegen_unit::module_codegen
  56:     0x7e3346ae7c74 - <rustc_codegen_llvm[223f880d581d8266]::LlvmCodegenBackend as rustc_codegen_ssa[cbebbc2647f36fb0]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  57:     0x7e3346c663e6 - <rustc_codegen_llvm[223f880d581d8266]::LlvmCodegenBackend as rustc_codegen_ssa[cbebbc2647f36fb0]::traits::backend::CodegenBackend>::codegen_crate
  58:     0x7e3346cc7098 - <rustc_interface[b41afafd8c6698e2]::queries::Linker>::codegen_and_build_linker
  59:     0x7e3346aa9f13 - rustc_interface[b41afafd8c6698e2]::interface::run_compiler::<core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>, rustc_driver_impl[fc56c8cda95d3675]::run_compiler::{closure#0}>::{closure#1}
  60:     0x7e3346a649c9 - std[b57f06e4736cb22c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b41afafd8c6698e2]::util::run_in_thread_with_globals<rustc_interface[b41afafd8c6698e2]::util::run_in_thread_pool_with_globals<rustc_interface[b41afafd8c6698e2]::interface::run_compiler<core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>, rustc_driver_impl[fc56c8cda95d3675]::run_compiler::{closure#0}>::{closure#1}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>::{closure#0}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>
  61:     0x7e3346a64772 - <<std[b57f06e4736cb22c]::thread::Builder>::spawn_unchecked_<rustc_interface[b41afafd8c6698e2]::util::run_in_thread_with_globals<rustc_interface[b41afafd8c6698e2]::util::run_in_thread_pool_with_globals<rustc_interface[b41afafd8c6698e2]::interface::run_compiler<core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>, rustc_driver_impl[fc56c8cda95d3675]::run_compiler::{closure#0}>::{closure#1}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>::{closure#0}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5b068f7ad0576a85]::result::Result<(), rustc_span[649ce653f8bbad3e]::ErrorGuaranteed>>::{closure#1} as core[5b068f7ad0576a85]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  62:     0x7e334817301b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hdf526901261a45f0
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/alloc/src/boxed.rs:2148:9
  63:     0x7e334817301b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h05fbbddbd3563387
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/alloc/src/boxed.rs:2148:9
  64:     0x7e334817301b - std::sys::pal::unix::thread::Thread::new::thread_start::hba30b590b19f0a35
                               at /rustc/8e86c9567154dc5a9ada15ab196d23eae2bd7d89/library/std/src/sys/pal/unix/thread.rs:105:17
  65:     0x7e33410a339d - <unknown>
  66:     0x7e334112849c - <unknown>
  67:                0x0 - <unknown>


rustc version: 1.82.0-nightly (8e86c9567 2024-08-01)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [codegen_select_candidate] computing candidate for `<library::ImplementsTraitOverConstGeneric<N> as library::LibTrait>`
#1 [resolve_instance_raw] resolving instance `<library::ImplementsTraitOverConstGeneric<N> as library::LibTrait>::NUM`
#2 [eval_to_allocation_raw] const-evaluating + checking `<library::ImplementsTraitOverConstGeneric<N> as library::LibTrait>::configure::{constant#0}`
#3 [eval_to_valtree] evaluating type-level constant
#4 [param_env] computing normalized predicates of `<library::ImplementsTraitOverConstGeneric<N> as library::LibTrait>::configure`
#5 [fn_abi_of_instance] computing call ABI of `<library::ImplementsTraitOverConstGeneric<4> as library::LibTrait>::configure`
end of query stack

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]`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