Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[ICE]: Encountered anon const with inference variable args but no error reported #133199

Open
1 of 4 tasks
vinay10949 opened this issue Nov 19, 2024 · 19 comments
Open
1 of 4 tasks
Assignees
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features This issue requires the use of incomplete features. S-has-bisection Status: a bisection has been found for this issue S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@vinay10949
Copy link

Code

I encountered an internal compiler error (ICE) while compiling a Rust project using rustc version 1.84.0-nightly (03ee48451 2024-11-18) on the aarch64-apple-darwin platform. The error message indicates that an anonymous constant with inference variable arguments was encountered, but no error was reported. This appears to be an issue within the compiler.

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:592: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 `/Users/vinay10949/Projects/decentralization/mishti/rustc-ice-2024-11-19T06_49_51-30490.txt` to your bug report

query stack during panic:
end of query stack
warning: `cli` (bin "cli") generated 2 warnings
error: could not compile `cli` (bin "cli"); 2 warnings emitted

Affected release channels

  • Previous Stable
  • Current Stable
  • Current Beta
  • Current Nightly

Rust Version

rustc --version --verbose
  rustc 1.84.0-nightly (03ee48451 2024-11-18)
  binary: rustc
  commit-hash: 03ee48451ff514defe859dd8e879ca1bd835789e
  host: aarch64-apple-darwin
  release: 1.84.0-nightly
  LLVM version: 17.0.0

Current error output

delayed bug: Encountered anon const with inference variable args but no error reported
disabled backtrace
delayed bug: Encountered anon const with inference variable args but no error reported
disabled backtrace
delayed bug: Encountered anon const with inference variable args but no error reported
disabled backtrace
delayed bug: Encountered anon const with inference variable args but no error reported
disabled backtrace
delayed bug: Encountered anon const with inference variable args but no error reported
disabled backtrace


rustc version: 1.84.0-nightly (03ee48451 2024-11-18)
platform: aarch64-apple-darwin⏎

Backtrace

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:592:27
             0: std::backtrace::Backtrace::create
             1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             3: <rustc_errors::diagnostic::Diag>::emit_producing_error_guaranteed
             4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             5: rustc_trait_selection::traits::try_evaluate_const
             6: rustc_trait_selection::traits::util::with_replaced_escaping_bound_vars::<rustc_middle::ty::consts::Const, rustc_middle::ty::consts::Const, <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const::{closure#0}>
             7: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             8: <rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             9: <rustc_middle::ty::predicate::Predicate as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
            10: alloc::vec::in_place_collect::from_iter_in_place::<core::iter::adapters::GenericShunt<core::iter::adapters::map::Map<alloc::vec::into_iter::IntoIter<rustc_middle::ty::predicate::Clause>, <alloc::vec::Vec<rustc_middle::ty::predicate::Clause> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>::{closure#0}>, core::result::Result<core::convert::Infallible, !>>, rustc_middle::ty::predicate::Clause>
            11: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer>::fold::<rustc_middle::ty::InstantiatedPredicates>
            12: rustc_trait_selection::traits::normalize::normalize_with_depth::<rustc_middle::ty::InstantiatedPredicates>
            13: <rustc_infer::infer::at::At as rustc_trait_selection::traits::normalize::NormalizeExt>::normalize::<rustc_middle::ty::InstantiatedPredicates>
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::instantiate_bounds
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::add_required_obligations_for_hir
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::instantiate_value_path
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            32: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            33: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            34: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            35: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            36: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            37: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            38: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            39: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            40: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            41: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            42: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            43: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            44: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            45: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            46: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            47: rustc_hir_typeck::check::check_fn
            48: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            49: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            50: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            51: rustc_hir_typeck::check::check_fn
            52: rustc_hir_typeck::typeck
            53: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            54: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            55: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            56: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            57: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            58: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
            59: rustc_hir_analysis::collect::type_of::type_of_opaque
            60: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            61: <rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            62: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            63: rustc_query_impl::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace
            64: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            65: rustc_hir_analysis::collect::type_of::type_of
            66: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            67: <rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            68: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            69: rustc_query_impl::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
            70: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            71: rustc_hir_analysis::check::check::check_item_type
            72: rustc_hir_analysis::check::wfcheck::check_well_formed
            73: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            74: <rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            75: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            76: rustc_query_impl::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
            77: rustc_middle::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, ()>
            78: <rustc_middle::hir::ModuleItems>::par_opaques::<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#4}>
            79: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
            80: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            81: <rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalModDefId)>>::call_once
            82: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            83: rustc_query_impl::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
            84: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_hir::hir_id::OwnerId, &[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#0}::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
            85: rustc_hir_analysis::check_crate
            86: rustc_interface::passes::analysis
            87: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            88: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            89: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            90: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            91: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#5}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            92: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            93: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            94: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
            95: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            96: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            97: std::sys::pal::unix::thread::Thread::new::thread_start
            98: __pthread_joiner_wake
          

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:592:27
             0: std::backtrace::Backtrace::create
             1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             3: <rustc_errors::diagnostic::Diag>::emit_producing_error_guaranteed
             4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             5: rustc_trait_selection::traits::try_evaluate_const
             6: rustc_trait_selection::traits::util::with_replaced_escaping_bound_vars::<rustc_middle::ty::consts::Const, rustc_middle::ty::consts::Const, <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const::{closure#0}>
             7: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             8: <rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             9: <rustc_middle::ty::predicate::Predicate as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
            10: rustc_trait_selection::traits::normalize::normalize_with_depth_to::<rustc_middle::ty::predicate::Predicate>
            11: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
            12: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
            13: <rustc_trait_selection::traits::fulfill::FulfillmentContext<rustc_trait_selection::traits::FulfillmentError> as rustc_infer::traits::engine::TraitEngine<rustc_trait_selection::traits::FulfillmentError>>::select_where_possible
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::resolve_vars_with_obligations
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::try_structurally_resolve_type
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::structurally_resolve_type
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            32: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            33: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            34: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            35: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            36: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            37: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            38: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            39: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            40: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            41: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            42: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            43: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            44: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            45: rustc_hir_typeck::check::check_fn
            46: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            47: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            48: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            49: rustc_hir_typeck::check::check_fn
            50: rustc_hir_typeck::typeck
            51: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            52: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            53: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            54: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            55: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            56: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
            57: rustc_hir_analysis::collect::type_of::type_of_opaque
            58: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            59: <rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            60: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            61: rustc_query_impl::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace
            62: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            63: rustc_hir_analysis::collect::type_of::type_of
            64: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            65: <rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            66: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            67: rustc_query_impl::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
            68: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            69: rustc_hir_analysis::check::check::check_item_type
            70: rustc_hir_analysis::check::wfcheck::check_well_formed
            71: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            72: <rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            73: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            74: rustc_query_impl::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
            75: rustc_middle::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, ()>
            76: <rustc_middle::hir::ModuleItems>::par_opaques::<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#4}>
            77: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
            78: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            79: <rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalModDefId)>>::call_once
            80: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            81: rustc_query_impl::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
            82: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_hir::hir_id::OwnerId, &[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#0}::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
            83: rustc_hir_analysis::check_crate
            84: rustc_interface::passes::analysis
            85: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            86: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            87: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            88: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            89: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#5}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            90: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            91: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            92: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
            93: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            94: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            95: std::sys::pal::unix::thread::Thread::new::thread_start
            96: __pthread_joiner_wake
          

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:592:27
             0: std::backtrace::Backtrace::create
             1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             3: <rustc_errors::diagnostic::Diag>::emit_producing_error_guaranteed
             4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             5: rustc_trait_selection::traits::try_evaluate_const
             6: rustc_trait_selection::traits::const_evaluatable::is_const_evaluatable
             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_trait_selection::traits::fulfill::FulfillmentContext<rustc_trait_selection::traits::FulfillmentError> as rustc_infer::traits::engine::TraitEngine<rustc_trait_selection::traits::FulfillmentError>>::select_where_possible
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::resolve_vars_with_obligations
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::try_structurally_resolve_type
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::structurally_resolve_type
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            32: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            33: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            34: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            35: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            36: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            37: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            38: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            39: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            40: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            41: rustc_hir_typeck::check::check_fn
            42: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            43: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            44: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            45: rustc_hir_typeck::check::check_fn
            46: rustc_hir_typeck::typeck
            47: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            48: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            49: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            50: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            51: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            52: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
            53: rustc_hir_analysis::collect::type_of::type_of_opaque
            54: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            55: <rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            56: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            57: rustc_query_impl::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace
            58: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            59: rustc_hir_analysis::collect::type_of::type_of
            60: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            61: <rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            62: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            63: rustc_query_impl::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
            64: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            65: rustc_hir_analysis::check::check::check_item_type
            66: rustc_hir_analysis::check::wfcheck::check_well_formed
            67: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            68: <rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            69: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            70: rustc_query_impl::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
            71: rustc_middle::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, ()>
            72: <rustc_middle::hir::ModuleItems>::par_opaques::<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#4}>
            73: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
            74: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            75: <rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalModDefId)>>::call_once
            76: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            77: rustc_query_impl::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
            78: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_hir::hir_id::OwnerId, &[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#0}::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
            79: rustc_hir_analysis::check_crate
            80: rustc_interface::passes::analysis
            81: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            82: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            83: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            84: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            85: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#5}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            86: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            87: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            88: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
            89: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            90: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            91: std::sys::pal::unix::thread::Thread::new::thread_start
            92: __pthread_joiner_wake
          

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:592:27
             0: std::backtrace::Backtrace::create
             1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             3: <rustc_errors::diagnostic::Diag>::emit_producing_error_guaranteed
             4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             5: rustc_trait_selection::traits::try_evaluate_const
             6: rustc_trait_selection::traits::util::with_replaced_escaping_bound_vars::<rustc_middle::ty::consts::Const, rustc_middle::ty::consts::Const, <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const::{closure#0}>
             7: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             8: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             9: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
            10: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
            11: rustc_middle::ty::util::fold_list::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty>, rustc_middle::ty::Ty, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>::{closure#0}>
            12: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer>::fold::<rustc_type_ir::ty_kind::FnSig<rustc_middle::ty::context::TyCtxt>>
            13: rustc_trait_selection::traits::normalize::normalize_with_depth::<rustc_type_ir::ty_kind::FnSig<rustc_middle::ty::context::TyCtxt>>
            14: <rustc_infer::infer::at::At as rustc_trait_selection::traits::normalize::NormalizeExt>::normalize::<rustc_type_ir::ty_kind::FnSig<rustc_middle::ty::context::TyCtxt>>
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::normalize::<rustc_type_ir::ty_kind::FnSig<rustc_middle::ty::context::TyCtxt>>
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::confirm_builtin_call
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_decl
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            32: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            33: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            34: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            35: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            36: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            37: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            38: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            39: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            40: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            41: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            42: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            43: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            44: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            45: rustc_hir_typeck::check::check_fn
            46: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
            47: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            48: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
            49: rustc_hir_typeck::check::check_fn
            50: rustc_hir_typeck::typeck
            51: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            52: <rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            53: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            54: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
            55: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            56: rustc_hir_analysis::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
            57: rustc_hir_analysis::collect::type_of::type_of_opaque
            58: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            59: <rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            60: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            61: rustc_query_impl::query_impl::type_of_opaque::get_query_incr::__rust_end_short_backtrace
            62: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            63: rustc_hir_analysis::collect::type_of::type_of
            64: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            65: <rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
            66: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            67: rustc_query_impl::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
            68: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            69: rustc_hir_analysis::check::check::check_item_type
            70: rustc_hir_analysis::check::wfcheck::check_well_formed
            71: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            72: <rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            73: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            74: rustc_query_impl::query_impl::check_well_formed::get_query_incr::__rust_end_short_backtrace
            75: rustc_middle::query::plumbing::query_ensure_error_guaranteed::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, ()>
            76: <rustc_middle::hir::ModuleItems>::par_opaques::<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#4}>
            77: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
            78: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            79: <rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalModDefId)>>::call_once
            80: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            81: rustc_query_impl::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
            82: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_hir::hir_id::OwnerId, &[rustc_hir::hir_id::OwnerId], <rustc_middle::hir::map::Map>::par_for_each_module<rustc_hir_analysis::check_crate::{closure#0}::{closure#0}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
            83: rustc_hir_analysis::check_crate
            84: rustc_interface::passes::analysis
            85: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            86: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            87: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            88: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            89: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#5}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            90: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
            91: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            92: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
            93: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            94: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            95: std::sys::pal::unix::thread::Thread::new::thread_start
            96: __pthread_joiner_wake
          

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 `/Users/vinay10949/Projects/decentralization/mishti/rustc-ice-2024-11-19T06_58_39-31408.txt` to your bug report

note: compiler flags: --crate-type bin -C opt-level=1 -C embed-bitcode=no -C codegen-units=16 -C incremental=[REDACTED] -C strip=debuginfo

note: some of the compiler flags provided by cargo are hidden
  process didn't exit successfully: `/Users/vinay10949/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name cli --edition=2021 crates/cli/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=214 --crate-type bin --emit=dep-info,link -C opt-level=1 -C embed-bitcode=no -C codegen-units=16 --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=70ab92cf0b9de42f -C extra-filename=-70ab92cf0b9de42f --out-dir /Users/vinay10949/Projects/decentralization/mishti/target/release/deps -C incremental=/Users/vinay10949/Projects/decentralization/mishti/target/release/incremental -C strip=debuginfo -L dependency=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps --extern ark_ed_on_bn254=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libark_ed_on_bn254-777124926cde145d.rlib --extern bincode=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libbincode-a4f2d93a3bd1ddb3.rlib --extern clap=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libclap-1d47a124b7004df9.rlib --extern ethers=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libethers-1d79a5372af84fcf.rlib --extern hex=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libhex-f69836561b5d2b7a.rlib --extern jsonrpsee=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libjsonrpsee-0fa323a445b5abbc.rlib --extern k256=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libk256-ac9554dfc2fa9660.rlib --extern lazy_static=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/liblazy_static-5e8ba3436795d5f4.rlib --extern messages=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libmessages-bdc67d924ef483e4.rlib --extern mishti_crypto=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libmishti_crypto-902b75e01588415f.rlib --extern rpc=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/librpc-e5365e8e82434d6b.rlib --extern rpc_trait=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/librpc_trait-1ab4dd0cb547c6c6.rlib --extern serde=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libserde-672fcdd673a9e4af.rlib --extern serde_json=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libserde_json-14d850a95cd08348.rlib --extern tokio=/Users/vinay10949/Projects/decentralization/mishti/target/release/deps/libtokio-54ad075d7acae233.rlib -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/ring-86ddefc3f904ee03/out -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/ring-220aa74511dbaf84/out -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/aws-lc-sys-8f36e1429ba5de38/out -L /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/lib/darwin -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/curl-sys-bd51297106f6900d/out/build -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/libnghttp2-sys-dd553636cd0d1bf6/out/i/lib -L native=/Users/vinay10949/Projects/decentralization/mishti/target/release/build/secp256k1-sys-1c14aa07d67558b4/out` (exit status: 101)

Anything else?

No response

@vinay10949 vinay10949 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 Nov 19, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 19, 2024
@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 19, 2024

are you using any unstable features, do you have a link to the ICEing code or something that would be useful in debugging this?

@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. labels Nov 19, 2024
@vinay10949
Copy link
Author

@BoxyUwU I am using this #![feature(generic_const_exprs)]

@BoxyUwU BoxyUwU self-assigned this Nov 19, 2024
@jieyouxu jieyouxu added F-generic_const_exprs `#![feature(generic_const_exprs)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 19, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Nov 20, 2024

Looks like #133243 has a reproducer but not minimal. (That report didn't incl. dep version info, asking)

@jieyouxu
Copy link
Member

jieyouxu commented Nov 20, 2024

MCVE from #133243 (ICEs on master checkout as of bfe809d):

// tests/ui/generic_const_exprs/meow.rs

//@ aux-build: fixed_bit_set.rs

extern crate fixed_bit_set;

use fixed_bit_set::FixedBitSet;

fn main() {
    FixedBitSet::<7>::new();
    //~^ ERROR
}
// tests/ui/generic_const_exprs/auxiliary/fixed_bit_set.rs

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

pub struct FixedBitSet<const N: usize>;

impl<const N: usize> FixedBitSet<N>
where
    [u8; N.div_ceil(8)]: Sized,
{
    pub fn new() -> Self {
        todo!()
    }
}

@jieyouxu jieyouxu added S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. labels Nov 20, 2024
@jieyouxu
Copy link
Member

@lqd bisected on the other issue to #132927.

@jieyouxu jieyouxu added the S-has-bisection Status: a bisection has been found for this issue label Nov 20, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Nov 20, 2024

Note that in the MCVE, the cross-crate seems to be a necessary condition. Inlining the struct and new fn defs into meow.rs does not ICE.

@0xfffxfff
Copy link

0xfffxfff commented Nov 22, 2024

FWIW: The jolt quickstart example produces this error on an M1
https://jolt.a16zcrypto.com/usage/quickstart.html

cargo +nightly run --release

produces:

   Compiling guest v0.1.0 (/Users/username/jolt-test/guest)
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:592: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 `/Users/username/jolt-test/rustc-ice-2024-11-22T22_05_07-95305.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C debuginfo=1 -C split-debuginfo=unpacked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `guest` (lib)

Nightly version:

  nightly-aarch64-apple-darwin unchanged - rustc 1.84.0-nightly (b19329a37 2024-11-21)

@Wasabi375
Copy link

I also encountered this bug. I did not manage to reduce the bug to a simple code example but I can share my repo:
https://github.com/Wasabi375/WasabiOS/tree/1dcc92c8795ae7dde9d40e7b3dd80fb144d070ed/staticvec

The bug reproduces when running cargo test --doc in the staticvec package.

rustc --version --verbose:

rustc 1.85.0-nightly (a2545fd6f 2024-11-28)
binary: rustc
commit-hash: a2545fd6fc66b4323f555223a860c451885d1d2b
commit-date: 2024-11-28
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.4

Error output

---- staticvec/src/lib.rs - StaticVec<T,N,L>::concat (line 1618) stdout ----
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

query stack during panic:
end of query stack
Couldn't compile the test.

rustc-ice-2024-11-30T07_58_44-194488.txt

Backtrace

---- staticvec/src/lib.rs - StaticVec<T,N,L>::concat (line 1618) stdout ----
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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             7: <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>::next
             8: <rustc_hir_typeck::method::probe::ProbeContext>::pick_method
             9: <rustc_hir_typeck::method::probe::ProbeContext>::pick_core
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::lookup_probe
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_overloaded_binop
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            25: rustc_hir_typeck::check::check_fn
            26: rustc_hir_typeck::typeck
            27: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            29: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            30: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            31: rustc_hir_analysis::check_crate
            32: rustc_interface::passes::run_required_analyses
            33: rustc_interface::passes::analysis
            34: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            35: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            36: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            37: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            38: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            39: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            40: std::sys::pal::unix::thread::Thread::new::thread_start
            41: start_thread
            42: clone3


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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             7: <rustc_type_ir::ty_kind::FnSig<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             8: <rustc_hir_typeck::method::confirm::ConfirmContext>::confirm
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            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_with_expectation_and_args::{closure#0}
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            23: rustc_hir_typeck::check::check_fn
            24: rustc_hir_typeck::typeck
            25: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            27: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            28: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            29: rustc_hir_analysis::check_crate
            30: rustc_interface::passes::run_required_analyses
            31: rustc_interface::passes::analysis
            32: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            34: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            35: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            36: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            37: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            38: std::sys::pal::unix::thread::Thread::new::thread_start
            39: start_thread
            40: clone3


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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_middle::ty::InstantiatedPredicates as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
             7: <rustc_hir_typeck::method::confirm::ConfirmContext>::confirm
             8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_overloaded_binop
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            22: rustc_hir_typeck::check::check_fn
            23: rustc_hir_typeck::typeck
            24: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            26: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            27: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            28: rustc_hir_analysis::check_crate
            29: rustc_interface::passes::run_required_analyses
            30: rustc_interface::passes::analysis
            31: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            32: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            33: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            34: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            35: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            36: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            37: std::sys::pal::unix::thread::Thread::new::thread_start
            38: start_thread
            39: clone3


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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer>::fold::<rustc_middle::ty::predicate::Predicate>
             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_argument_types
            10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_overloaded_binop
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            24: rustc_hir_typeck::check::check_fn
            25: rustc_hir_typeck::typeck
            26: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            27: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            28: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            29: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            30: rustc_hir_analysis::check_crate
            31: rustc_interface::passes::run_required_analyses
            32: rustc_interface::passes::analysis
            33: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            34: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            35: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            36: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            37: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            38: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            39: std::sys::pal::unix::thread::Thread::new::thread_start
            40: start_thread
            41: clone3


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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: rustc_trait_selection::traits::const_evaluatable::is_const_evaluatable.cold
             6: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
             7: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
             8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_argument_types
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            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_with_expectation_and_args::{closure#0}
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            23: rustc_hir_typeck::check::check_fn
            24: rustc_hir_typeck::typeck
            25: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            27: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            28: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            29: rustc_hir_analysis::check_crate
            30: rustc_interface::passes::run_required_analyses
            31: rustc_interface::passes::analysis
            32: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            34: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            35: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            36: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            37: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            38: std::sys::pal::unix::thread::Thread::new::thread_start
            39: start_thread
            40: clone3


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: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
             4: rustc_trait_selection::traits::try_evaluate_const.cold
             5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
             6: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
             7: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor>
             8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_argument_types
             9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            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_with_expectation_and_args::{closure#0}
            13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
            21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
            22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
            23: rustc_hir_typeck::check::check_fn
            24: rustc_hir_typeck::typeck
            25: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            26: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            27: rustc_query_impl::query_impl::typeck::get_query_non_incr::__rust_end_short_backtrace
            28: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
            29: rustc_hir_analysis::check_crate
            30: rustc_interface::passes::run_required_analyses
            31: rustc_interface::passes::analysis
            32: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            34: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            35: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
            36: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            37: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            38: std::sys::pal::unix::thread::Thread::new::thread_start
            39: start_thread
            40: clone3


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/burkhard/programming/projects/WasabiOS/rustc-ice-2024-11-30T07_54_34-187877.txt` to your bug report

query stack during panic:
end of query stack
Couldn't compile the test.

@jieyouxu

This comment has been minimized.

@jieyouxu jieyouxu added the requires-incomplete-features This issue requires the use of incomplete features. label Dec 9, 2024
@jieyouxu jieyouxu marked this as not a duplicate of #134044 Dec 10, 2024
peter-lyons-kehl added a commit to peter-lyons-kehl/phantom-newtype-rs that referenced this issue Dec 10, 2024
peter-lyons-kehl added a commit to peter-lyons-kehl/phantom-newtype-rs that referenced this issue Dec 10, 2024
@nazar-pc
Copy link

I also hit this:

delayed bug: Encountered anon const with inference variable args but no error reported
   0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
   1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
   2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
   4: rustc_trait_selection::traits::try_evaluate_const.cold
   5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
   6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustc_trait_selection::traits::normalize::AssocTypeNormalizer>
   7: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_binder::<rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt>>
   8: <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
   9: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}
  10: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  11: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation
  12: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
  13: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
  14: rustc_traits::evaluate_obligation::evaluate_obligation
  15: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 2]>>
  16: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::Erased<[u8; 2]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  17: rustc_query_impl::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  19: <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>::next
  20: <rustc_hir_typeck::method::probe::ProbeContext>::pick_method
  21: <rustc_hir_typeck::method::probe::ProbeContext>::pick_core
  22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::probe_for_name
  23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
  29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  31: rustc_hir_typeck::check::check_fn
  32: rustc_hir_typeck::typeck
  33: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
  34: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  35: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  36: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
  37: rustc_hir_analysis::check_crate
  38: rustc_interface::passes::run_required_analyses
  39: rustc_interface::passes::analysis
  40: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
  41: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  42: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  43: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  44: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  45: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  46: std::sys::pal::unix::thread::Thread::new::thread_start
  47: start_thread
             at ./nptl/pthread_create.c:447:8
  48: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

delayed bug: Encountered anon const with inference variable args but no error reported
   0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
   1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
   2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
   4: rustc_trait_selection::traits::try_evaluate_const.cold
   5: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_const
   6: <rustc_trait_selection::traits::normalize::AssocTypeNormalizer as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_binder::<rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt>>
   7: <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
   8: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}
   9: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  10: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation
  11: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
  12: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
  13: rustc_traits::evaluate_obligation::evaluate_obligation
  14: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 2]>>
  15: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::Erased<[u8; 2]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  16: rustc_query_impl::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  17: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  18: <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>::next
  19: <rustc_hir_typeck::method::probe::ProbeContext>::pick_method
  20: <rustc_hir_typeck::method::probe::ProbeContext>::pick_core
  21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::probe_for_name
  22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
  23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
  28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  30: rustc_hir_typeck::check::check_fn
  31: rustc_hir_typeck::typeck
  32: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
  33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  34: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  35: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
  36: rustc_hir_analysis::check_crate
  37: rustc_interface::passes::run_required_analyses
  38: rustc_interface::passes::analysis
  39: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
  40: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  41: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  42: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  43: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  44: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  45: std::sys::pal::unix::thread::Thread::new::thread_start
  46: start_thread
             at ./nptl/pthread_create.c:447:8
  47: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

delayed bug: Encountered anon const with inference variable args but no error reported
   0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
   1: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
   2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
   3: <rustc_errors::DiagCtxtHandle>::delayed_bug::<&str>
   4: rustc_trait_selection::traits::try_evaluate_const.cold
   5: rustc_trait_selection::traits::const_evaluatable::is_const_evaluatable.cold
   6: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_candidate::{closure#0}::{closure#0}
   7: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
   8: <rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation
   9: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_trait_predicate_recursively
  10: <rustc_trait_selection::traits::select::SelectionContext>::evaluate_root_obligation
  11: rustc_traits::evaluate_obligation::evaluate_obligation
  12: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::evaluate_obligation::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 2]>>
  13: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::canonical::CanonicalQueryInput<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::predicate::Predicate>>, rustc_middle::query::erase::Erased<[u8; 2]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  14: rustc_query_impl::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  15: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  16: <core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_hir_typeck::method::probe::Candidate>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#0}>, <rustc_hir_typeck::method::probe::ProbeContext>::consider_candidates::{closure#1}> as core::iter::traits::iterator::Iterator>::next
  17: <rustc_hir_typeck::method::probe::ProbeContext>::pick_method
  18: <rustc_hir_typeck::method::probe::ProbeContext>::pick_core
  19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::probe_for_name
  20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_path
  21: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  22: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
  26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
  27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28: rustc_hir_typeck::check::check_fn
  29: rustc_hir_typeck::typeck
  30: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
  31: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>, rustc_query_system::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  32: rustc_query_impl::query_impl::typeck::get_query_incr::__rust_end_short_backtrace
  33: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
  34: rustc_hir_analysis::check_crate
  35: rustc_interface::passes::run_required_analyses
  36: rustc_interface::passes::analysis
  37: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
  38: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
  39: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  40: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
  41: std::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  42: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  43: std::sys::pal::unix::thread::Thread::new::thread_start
  44: start_thread
             at ./nptl/pthread_create.c:447:8
  45: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78



rustc version: 1.85.0-nightly (a224f3807 2024-12-09)
platform: x86_64-unknown-linux-gnu

Happens on autonomys/subspace@0d36b46

@nastynaz
Copy link

nastynaz commented Dec 21, 2024

Is there a fix for this? My project won't compile and I can't use stable as I need the nightly compiler. What are my options?

Update: I performed a binary search on each nightly compiler and found that the issue started with nightly-2024-11-13 at least for target aarch64-apple-darwin.

@nazar-pc
Copy link

For now the only option I see is to fix the nightly compiler version. Stuck and unable to upgrade as well.

@mickeprag
Copy link

Fyi, I use nightly 2024-11-01 where this issue is not yet present. I have not pinned down exactly when the issue appears but 2024-12-01 does not work, so sometimes in between...

@jean-airoldie
Copy link

@nastynaz

Is there a fix for this? My project won't compile and I can't use stable as I need the nightly compiler. What are my options?

In my case, which was a parent crate crashing because of its dependency to a child crate who used const generics, adding #![feature(generic_const_exprs)] to the parent crate as well fixed the issue.

@BoxyUwU
Copy link
Member

BoxyUwU commented Dec 22, 2024

Yeah, I'm only aware of this ICE occuring in cross crate scenarios. If adding generic_const_exprs to all your crates that are depending on items from upstream crates using generic_const_exprs doesn't resolve the ICE then that would be good to know, but otherwise that should be a good workaround.

@nazar-pc
Copy link

Adding #![feature(generic_const_exprs)] to a couple of crates worked for me too, thanks for the workaround!

@peter-lyons-kehl
Copy link
Contributor

@BoxyUwU In a similar issue (I can't be sure if it's a duplicate) REMOVING #![feature(generic_const_exprs)] from the consumer crate (in my instance it's in the inline test) prevents the ICE (and then rustc shows an actual compile error).

Please see #134044 (comment). Even though it was me who somehow narrowed it somewhat down (with the previous help of @cyrgani), I don't remember too much - it was 2 weeks ago... If it doesn't make sense, let me know and I'll dive again.

Note that in the code reported earlier in that issue (#134044), that is: before the above linked comment, #![feature(generic_const_exprs)] DID "fix"/workaround the ICE. I don't know if those ICE's are same or whether/how they differ.

Tehforsch added a commit to Tehforsch/diman that referenced this issue Jan 7, 2025
Some of them were missing this feature annotation but used to compile
and pass for some inexplicable reason. Now this missing feature gate
causes an ICE (rust-lang/rust#133199). This
adds the feature gates in all the doctests, but does not yet address the
fact that this ICE also occurs in calling crates that don't have
`#![feature(generic_const_exprs)]` set. Maybe a workaround could be to
check for this feature explicitly and throw a helpful error message in
diman.
Tehforsch added a commit to Tehforsch/diman that referenced this issue Jan 8, 2025
Some of them were missing this feature annotation but used to compile
and pass for some inexplicable reason. Now this missing feature gate
causes an ICE (rust-lang/rust#133199). This
adds the feature gates in all the doctests, but does not yet address the
fact that this ICE also occurs in calling crates that don't have
`#![feature(generic_const_exprs)]` set. Maybe a workaround could be to
check for this feature explicitly and throw a helpful error message in
diman.
Tehforsch added a commit to Tehforsch/diman that referenced this issue Jan 8, 2025
Some of them were missing this feature annotation but used to compile
and pass for some inexplicable reason. Now this missing feature gate
causes an ICE (rust-lang/rust#133199). This
adds the feature gates in all the doctests, but does not yet address the
fact that this ICE also occurs in calling crates that don't have
`#![feature(generic_const_exprs)]` set. Maybe a workaround could be to
check for this feature explicitly and throw a helpful error message in
diman.
Tehforsch added a commit to Tehforsch/diman that referenced this issue Jan 8, 2025
Some of them were missing this feature annotation but used to compile
and pass for some inexplicable reason. Now this missing feature gate
causes an ICE (rust-lang/rust#133199). This
adds the feature gates in all the doctests, but does not yet address the
fact that this ICE also occurs in calling crates that don't have
`#![feature(generic_const_exprs)]` set. Maybe a workaround could be to
check for this feature explicitly and throw a helpful error message in
diman.
@jieyouxu jieyouxu marked this as a duplicate of #134836 Jan 14, 2025
@bend-n
Copy link
Contributor

bend-n commented Feb 3, 2025

have a shorter mrp.

two crates: bar

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
pub fn pop<const N: usize>(_: [(); N]) -> [(); N - 1] {
    panic!()
}

main

pub fn main() {
    bar::pop([()]);
}

thanks to @theemathas and @pitust for minimizing

Shortest possible mrp, i think.

@theemathas
Copy link
Contributor

The "fix" is to add #![feature(generic_const_exprs)] to the top of every crate that depends on your crate, and to the top of every doctest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-incomplete-features This issue requires the use of incomplete features. S-has-bisection Status: a bisection has been found for this issue S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue 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