Skip to content

ICE: Encountered anon const with inference variable args but no error reported #133884

Closed as duplicate of#133199
@Annie-Schwartz

Description

@Annie-Schwartz

Code

It seems like this gets triggered when using a library that enables generic_const_exprs in a crate that doesn't, in a specific circumstance.

lib.rs in crate A

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

pub trait HasLen {
    const LEN: usize;
}

pub struct Header;
impl HasLen for Header {
    const LEN: usize = 5;
}

pub trait Message: HasLen {
    fn pack(self) -> [u8; Header::LEN + Self::LEN]
    where
        Self: Sized,
    {
        [0; Header::LEN + Self::LEN]
    }
}

pub struct MyMessage;

impl HasLen for MyMessage {
    const LEN: usize = 2;
}

impl Message for MyMessage {}

pub struct Light;

impl Light {
    pub fn send<M: Message>(self, m: M)
    where
        [(); Header::LEN + M::LEN]:,
    {
        let _bytes = m.pack();
    }
}

main.rs in crate B that depends on crate A

// if these aren't commented out, it compiles fine
// #![allow(incomplete_features)]
// #![feature(generic_const_exprs)]

use crate_a::*;

fn main() {
    Light.send(MyMessage);
}

Meta

rustc --version --verbose:

rustc 1.85.0-nightly (c44b3d50f 2024-12-03)
binary: rustc
commit-hash: c44b3d50fea96a3e0417e8264c16ea21a0a3fca2
commit-date: 2024-12-03
host: x86_64-pc-windows-msvc
release: 1.85.0-nightly
LLVM version: 19.1.4
Backtrace

note: no errors encountered even though delayed bugs were created                                           

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: Encountered anon const with inference variable args but no error reported    
  |
  = note: delayed at compiler\rustc_trait_selection\src\traits\mod.rs:605:27 - disabled 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 `C:\Users\andre\RustroverProjects\ice_minify\rustc-ice-2024-12-05T02_47_05-32836.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:
end of query stack
error: could not compile `user` (bin "user")                                                                

Caused by:
  process didn't exit successfully: `C:\Users\andre\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin\rus
tc.exe --crate-name user --edition=2024 user\src\main.rs --error-format=json --json=diagnostic-rendered-ansi,
artifacts,future-incompat --diagnostic-width=108 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C
 debuginfo=2 --check-cfg cfg(docsrs) --check-cfg "cfg(feature, values())" -C metadata=c5bd3a0593d738d4 --out-
dir C:\Users\andre\RustroverProjects\ice_minify\target\debug\deps -C incremental=C:\Users\andre\RustroverProj
ects\ice_minify\target\debug\incremental -L dependency=C:\Users\andre\RustroverProjects\ice_minify\target\deb
ug\deps --extern library=C:\Users\andre\RustroverProjects\ice_minify\target\debug\deps\liblibrary-99360a0ca7f077c6.rlib` (exit code: 101)
(base) PS C:\Users\andre\RustroverProjects\ice_minify> $env:RUST_BACKTRACE = 1; echo $env:RUST_BACKTRACE
1
(base) PS C:\Users\andre\RustroverProjects\ice_minify> $env:RUST_BACKTRACE = 1; cargo b                 
   Compiling user v0.1.0 (C:\Users\andre\RustroverProjects\ice_minify\user)
note: no errors encountered even though delayed bugs were created                                           

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: Encountered anon const with inference variable args but no error reported   
  |
  = note: delayed at compiler\rustc_trait_selection\src\traits\mod.rs:605:27
             0: std::backtrace_rs::backtrace::dbghelp64::trace
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
             2: std::backtrace::Backtrace::create
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:331   
             3: std::backtrace::Backtrace::capture
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:296   
             4: <rustc_errors::DiagCtxtHandle>::steal_fulfilled_expectation_ids
             5: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             6: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             7: RINvMs6_NtCseICr77WMTjC_9hashbrown3rawINtB6_8RawTableTjINtNtNtCseVVL61K9TT9_13rustc_type_ir12
search_graph12global_cache12WithOverflowNtNtNtCsbM691JXDP8V_12rustc_middle2ty7context6TyCtxtEEE14reserve_rehashNCINvNtB8_3map11make_hasherjBR_INtNtCs7r6DgGsStSg_4c
             8: rustc_trait_selection::traits::try_evaluate_const
             9: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
            10: RINvMs6_NtCseICr77WMTjC_9hashbrown3rawINtB6_8RawTableTNtNtCsi9S4RyxjpsP_9rustc_hir6hir_id11It
emLocalIdNtNtCsbM691JXDP8V_12rustc_middle2ty2TyEE14reserve_rehashNCINvNtB8_3map11make_hasherBQ_B1C_NtCseQRVI1CoU19_10rustc_hash13FxBuildHasherE0ECs2zLmjg8NQmL_16ru
            11: <rustc_hir_typeck::gather_locals::GatherLocalsVisitor as rustc_hir::intravisit::Visitor>::visit_pat
            12: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            13: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            14: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            15: rustc_hir_typeck::typeck
            16: rustc_hir_typeck::typeck
            17: rustc_query_impl::plumbing::query_key_hash_verify_all
            18: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtCsgKT6NpK8sVH_21rustc_data_structures9vec_cache8VecCacheNtNtCs4Ey5dEGT0n1_10rustc_span6def_id10LocalDefIdINtNtNtCsbM691JXDP8V
            19: rustc_query_impl::plumbing::query_key_hash_verify_all
            20: <hashbrown::raw::RawTable<(&usize, ())>>::reserve_rehash::<hashbrown::map::make_hasher<&usize, (), rustc_hash::FxBuildHasher>::{closure#0}>
            21: rustc_hir_analysis::check_crate
            22: rustc_interface::passes::resolver_for_lowering_raw
            23: rustc_interface::passes::analysis
            24: <alloc::sync::Arc<alloc::vec::Vec<rustc_middle::ty::region::Region>>>::drop_slow
            25: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsbM691JXDP8V_12rustc_middle5query5erase6ErasedAhj1_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
            26: rustc_query_impl::query_system
            27: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            28: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCseUgmqVEz8R0
_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compilerINtNtCs7r6DgGsStSg_4core6result6Res
            29: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            30: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            31: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            32: std::sys::pal::windows::thread::impl$0::new::thread_start
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\sys\pal\windows\thread.rs:55
            33: BaseThreadInitThunk
            34: RtlUserThreadStart


error: internal compiler error: Encountered anon const with inference variable args but no error reported   
  |
  = note: delayed at compiler\rustc_trait_selection\src\traits\mod.rs:605:27
             0: std::backtrace_rs::backtrace::dbghelp64::trace
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
             2: std::backtrace::Backtrace::create
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:331   
             3: std::backtrace::Backtrace::capture
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:296   
             4: <rustc_errors::DiagCtxtHandle>::steal_fulfilled_expectation_ids
             5: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             6: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             7: RINvMs6_NtCseICr77WMTjC_9hashbrown3rawINtB6_8RawTableTjINtNtNtCseVVL61K9TT9_13rustc_type_ir12
search_graph12global_cache12WithOverflowNtNtNtCsbM691JXDP8V_12rustc_middle2ty7context6TyCtxtEEE14reserve_rehashNCINvNtB8_3map11make_hasherjBR_INtNtCs7r6DgGsStSg_4c
             8: rustc_trait_selection::traits::try_evaluate_const
             9: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
            10: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
            11: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fu
lfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
            12: rustc_hir_typeck::typeck
            13: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            14: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            15: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            16: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            17: rustc_hir_typeck::typeck
            18: rustc_hir_typeck::typeck
            19: rustc_query_impl::plumbing::query_key_hash_verify_all
            20: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtCsgKT6NpK8sVH_21rustc_data_structures9vec_cache8VecCacheNtNtCs4Ey5dEGT0n1_10rustc_span6def_id10LocalDefIdINtNtNtCsbM691JXDP8V
            21: rustc_query_impl::plumbing::query_key_hash_verify_all
            22: <hashbrown::raw::RawTable<(&usize, ())>>::reserve_rehash::<hashbrown::map::make_hasher<&usize, (), rustc_hash::FxBuildHasher>::{closure#0}>
            23: rustc_hir_analysis::check_crate
            24: rustc_interface::passes::resolver_for_lowering_raw
            25: rustc_interface::passes::analysis
            26: <alloc::sync::Arc<alloc::vec::Vec<rustc_middle::ty::region::Region>>>::drop_slow
            27: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsbM691JXDP8V_12rustc_middle5query5erase6ErasedAhj1_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
            28: rustc_query_impl::query_system
            29: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            30: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCseUgmqVEz8R0
_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compilerINtNtCs7r6DgGsStSg_4core6result6Res
            31: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            32: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            33: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            34: std::sys::pal::windows::thread::impl$0::new::thread_start
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\sys\pal\windows\thread.rs:55
            35: BaseThreadInitThunk
            36: RtlUserThreadStart


error: internal compiler error: Encountered anon const with inference variable args but no error reported   
  |
  = note: delayed at compiler\rustc_trait_selection\src\traits\mod.rs:605:27
             0: std::backtrace_rs::backtrace::dbghelp64::trace
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
             2: std::backtrace::Backtrace::create
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:331   
             3: std::backtrace::Backtrace::capture
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:296   
             4: <rustc_errors::DiagCtxtHandle>::steal_fulfilled_expectation_ids
             5: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             6: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             7: RINvMs6_NtCseICr77WMTjC_9hashbrown3rawINtB6_8RawTableTjINtNtNtCseVVL61K9TT9_13rustc_type_ir12
search_graph12global_cache12WithOverflowNtNtNtCsbM691JXDP8V_12rustc_middle2ty7context6TyCtxtEEE14reserve_rehashNCINvNtB8_3map11make_hasherjBR_INtNtCs7r6DgGsStSg_4c
             8: rustc_trait_selection::traits::try_evaluate_const
             9: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
            10: <thin_vec::IntoIter<_> as core::ops::drop::Drop>::drop::drop_non_singleton::<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>
            11: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
            12: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
            13: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fu
lfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
            14: rustc_hir_typeck::typeck
            15: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            16: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            17: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            18: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            19: rustc_hir_typeck::typeck
            20: rustc_hir_typeck::typeck
            21: rustc_query_impl::plumbing::query_key_hash_verify_all
            22: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtCsgKT6NpK8sVH_21rustc_data_structures9vec_cache8VecCacheNtNtCs4Ey5dEGT0n1_10rustc_span6def_id10LocalDefIdINtNtNtCsbM691JXDP8V
            23: rustc_query_impl::plumbing::query_key_hash_verify_all
            24: <hashbrown::raw::RawTable<(&usize, ())>>::reserve_rehash::<hashbrown::map::make_hasher<&usize, (), rustc_hash::FxBuildHasher>::{closure#0}>
            25: rustc_hir_analysis::check_crate
            26: rustc_interface::passes::resolver_for_lowering_raw
            27: rustc_interface::passes::analysis
            28: <alloc::sync::Arc<alloc::vec::Vec<rustc_middle::ty::region::Region>>>::drop_slow
            29: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsbM691JXDP8V_12rustc_middle5query5erase6ErasedAhj1_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
            30: rustc_query_impl::query_system
            31: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            32: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCseUgmqVEz8R0
_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compilerINtNtCs7r6DgGsStSg_4core6result6Res
            33: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            34: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            35: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            36: std::sys::pal::windows::thread::impl$0::new::thread_start
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\sys\pal\windows\thread.rs:55
            37: BaseThreadInitThunk
            38: RtlUserThreadStart


error: internal compiler error: Encountered anon const with inference variable args but no error reported   
  |
  = note: delayed at compiler\rustc_trait_selection\src\traits\mod.rs:605:27
             0: std::backtrace_rs::backtrace::dbghelp64::trace
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
             1: std::backtrace_rs::backtrace::trace_unsynchronized
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
             2: std::backtrace::Backtrace::create
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:331   
             3: std::backtrace::Backtrace::capture
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\backtrace.rs:296   
             4: <rustc_errors::DiagCtxtHandle>::steal_fulfilled_expectation_ids
             5: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             6: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             7: RINvMs6_NtCseICr77WMTjC_9hashbrown3rawINtB6_8RawTableTjINtNtNtCseVVL61K9TT9_13rustc_type_ir12
search_graph12global_cache12WithOverflowNtNtNtCsbM691JXDP8V_12rustc_middle2ty7context6TyCtxtEEE14reserve_rehashNCINvNtB8_3map11make_hasherjBR_INtNtCs7r6DgGsStSg_4c
             8: rustc_trait_selection::traits::try_evaluate_const
             9: rustc_trait_selection::traits::const_evaluatable::is_const_evaluatable
            10: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
            11: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fu
lfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
            12: rustc_hir_typeck::typeck
            13: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            14: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            15: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            16: <<rustc_hir_typeck::fn_ctxt::FnCtxt>::deduce_closure_signature_from_predicates::MentionsTy as rustc_type_ir::visit::TypeVisitor<rustc_middle::ty::context::TyCtxt>>::visit_ty
            17: rustc_hir_typeck::typeck
            18: rustc_hir_typeck::typeck
            19: rustc_query_impl::plumbing::query_key_hash_verify_all
            20: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtCsgKT6NpK8sVH_21rustc_data_structures9vec_cache8VecCacheNtNtCs4Ey5dEGT0n1_10rustc_span6def_id10LocalDefIdINtNtNtCsbM691JXDP8V
            21: rustc_query_impl::plumbing::query_key_hash_verify_all
            22: <hashbrown::raw::RawTable<(&usize, ())>>::reserve_rehash::<hashbrown::map::make_hasher<&usize, (), rustc_hash::FxBuildHasher>::{closure#0}>
            23: rustc_hir_analysis::check_crate
            24: rustc_interface::passes::resolver_for_lowering_raw
            25: rustc_interface::passes::analysis
            26: <alloc::sync::Arc<alloc::vec::Vec<rustc_middle::ty::region::Region>>>::drop_slow
            27: RINvNtNtCsevXlmGW2rGa_18rustc_query_system5query8plumbing17try_execute_queryINtCs13jhqztT3II_
16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCsbM691JXDP8V_12rustc_middle5query5erase6ErasedAhj1_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
            28: rustc_query_impl::query_system
            29: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            30: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCseUgmqVEz8R0
_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compilerINtNtCs7r6DgGsStSg_4core6result6Res
            31: RINvNtNtCslMaE1UCzNSr_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6thread
NtB1h_7Builder16spawn_unchecked_INtNtCsdz1wMmHgTlu_5alloc5boxed3BoxDINtNtNtCs7r6DgGsStSg_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECsjB8
            32: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            33: alloc::boxed::impl$28::call_once
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\alloc\src\boxed.rs:1970    
            34: std::sys::pal::windows::thread::impl$0::new::thread_start
                       at /rustc/c44b3d50fea96a3e0417e8264c16ea21a0a3fca2/library\std\src\sys\pal\windows\thread.rs:55
            35: BaseThreadInitThunk
            36: RtlUserThreadStart

Metadata

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.requires-incomplete-featuresThis issue requires the use of incomplete features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions