Skip to content

ICE: args not compatible with generics for abi::FnAbiGccExt #150440

@bjorn3

Description

@bjorn3

Code

Put the following in compiler/rustc_codegen_gcc/src/lib.rs and run ./x.py clippy compiler/rustc_codegen_gcc:

mod abi {

    pub trait FnAbiGccExt<'tcx> {
        fn gcc_type(&self);
    }

    impl<'tcx> FnAbiGccExt<'tcx> for () {
        fn gcc_type(&self) {
            panic!()
        }
    }
}

mod intrinsic {
    pub trait GccType {
        fn gcc_type(&self);
    }

    pub fn codegen_llvm_intrinsic_call(fn_abi: &()) {
        fn_abi.gcc_type();
    }
}

Meta

rustc --version --verbose:

<version>

I found this ICE in #148533, which is based on 4c67064.

Error output

error: internal compiler error: compiler/rustc_middle/src/ty/context.rs:2986:17: args not compatible with generics for abi::FnAbiGccExt: args=[
                                    &ReLateParam(DefId(0:13 ~ rustc_codegen_gcc[2785]::intrinsic::codegen_llvm_intrinsic_call), LateNamed(DefId(0:17 ~ rustc_codegen_gcc[2785]::intrinsic::codegen_llvm_intrinsic_call::'_))) (),
                                ], generics=[
                                    Self/#0,
                                    'tcx/#1,
                                ]
Backtrace

error: internal compiler error: compiler/rustc_middle/src/ty/context.rs:2986:17: args not compatible with generics for abi::FnAbiGccExt: args=[
                                    &ReLateParam(DefId(0:13 ~ rustc_codegen_gcc[2785]::intrinsic::codegen_llvm_intrinsic_call), LateNamed(DefId(0:17 ~ rustc_codegen_gcc[2785]::intrinsic::codegen_llvm_intrinsic_call::'_))) (),
                                ], generics=[
                                    Self/#0,
                                    'tcx/#1,
                                ]


thread 'rustc' (4070084) panicked at compiler/rustc_middle/src/ty/context.rs:2986:17:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:761:5
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panic.rs:260:5
   2: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             at ./compiler/rustc_errors/src/diagnostic.rs:63:9
   3: <rustc_errors::diagnostic::Diag<rustc_errors::diagnostic::BugAbort>>::emit
             at ./compiler/rustc_errors/src/diagnostic.rs:1405:9
   4: <rustc_errors::DiagCtxtHandle>::bug::<alloc::string::String>
             at ./compiler/rustc_errors/src/lib.rs:1231:30
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
             at ./compiler/rustc_middle/src/util/bug.rs:39:48
   6: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
             at ./compiler/rustc_middle/src/ty/context/tls.rs:136:23
   7: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
             at ./compiler/rustc_middle/src/ty/context/tls.rs:79:18
   8: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>
             at ./compiler/rustc_middle/src/ty/context/tls.rs:134:5
   9: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
             at ./compiler/rustc_middle/src/util/bug.rs:33:5
  10: rustc_middle::util::bug::bug_fmt
             at ./compiler/rustc_middle/src/util/bug.rs:16:5
  11: <rustc_middle::ty::context::TyCtxt>::debug_assert_args_compatible
             at ./compiler/rustc_middle/src/macros.rs:18:9
  12: <rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>::new_from_args
             at ./compiler/rustc_type_ir/src/predicate.rs:74:18
  13: <rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>>::new::<core::option::IntoIter<rustc_middle::ty::Ty>>
             at ./compiler/rustc_type_ir/src/predicate.rs:84:9
  14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::detect_and_explain_multiple_crate_versions_of_trait_item
             at ./compiler/rustc_hir_typeck/src/method/suggest.rs:4493:25
  15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::suggest_traits_to_import
             at ./compiler/rustc_hir_typeck/src/method/suggest.rs:3868:30
  16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_no_match_method_error
             at ./compiler/rustc_hir_typeck/src/method/suggest.rs:1210:18
  17: <rustc_hir_typeck::fn_ctxt::FnCtxt>::report_method_error
             at ./compiler/rustc_hir_typeck/src/method/suggest.rs:207:61
  18: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_method_call
             at ./compiler/rustc_hir_typeck/src/expr.rs:1511:33
  19: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
             at ./compiler/rustc_hir_typeck/src/expr.rs:391:22
  20: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
             at ./compiler/rustc_hir_typeck/src/expr.rs:291:23
  21: stacker::maybe_grow::<rustc_middle::ty::Ty, <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
             at /home/gh-bjorn3/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/stacker-0.1.21/src/lib.rs:57:9
  22: rustc_data_structures::stack::ensure_sufficient_stack::<rustc_middle::ty::Ty, <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
             at ./compiler/rustc_data_structures/src/stack.rs:21:5
  23: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
             at ./compiler/rustc_hir_typeck/src/expr.rs:286:18
  24: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation
             at ./compiler/rustc_hir_typeck/src/expr.rs:231:14
  25: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr
             at ./compiler/rustc_hir_typeck/src/expr.rs:210:14
  26: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
             at ./compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:994:31
  27: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block::{closure#0}
             at ./compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1043:22
  28: <rustc_hir_typeck::fn_ctxt::FnCtxt>::with_breakable_ctxt::<<rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block::{closure#0}, ()>
             at ./compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:1484:22
  29: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_block
             at ./compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1041:31
  30: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
             at ./compiler/rustc_hir_typeck/src/expr.rs:387:46
  31: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
             at ./compiler/rustc_hir_typeck/src/expr.rs:291:23
  32: stacker::maybe_grow::<rustc_middle::ty::Ty, <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
             at /home/gh-bjorn3/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/stacker-0.1.21/src/lib.rs:57:9
  33: rustc_data_structures::stack::ensure_sufficient_stack::<rustc_middle::ty::Ty, <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
             at ./compiler/rustc_data_structures/src/stack.rs:21:5
  34: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
             at ./compiler/rustc_hir_typeck/src/expr.rs:286:18
  35: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation
             at ./compiler/rustc_hir_typeck/src/expr.rs:231:14
  36: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_hint
             at ./compiler/rustc_hir_typeck/src/expr.rs:186:14
  37: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_or_body_tail
             at ./compiler/rustc_hir_typeck/src/expr.rs:977:35
  38: rustc_hir_typeck::check::check_fn
             at ./compiler/rustc_hir_typeck/src/check.rs:130:9
  39: rustc_hir_typeck::typeck_with_inspect::{closure#0}
             at ./compiler/rustc_hir_typeck/src/lib.rs:192:9
  40: rustc_hir_typeck::typeck_with_inspect
             at ./compiler/rustc_hir_typeck/src/lib.rs:105:1
  41: rustc_query_impl::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}
             at ./compiler/rustc_query_impl/src/plumbing.rs:298:9
      [... omitted 22 frames ...]
  42: rustc_middle::query::inner::query_ensure::<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>>
             at ./compiler/rustc_middle/src/query/inner.rs:51:9
  43: <rustc_middle::query::plumbing::TyCtxtEnsureOk>::typeck::<rustc_span::def_id::LocalDefId>
             at ./compiler/rustc_middle/src/query/plumbing.rs:173:9
  44: rustc_hir_analysis::check_crate::{closure#2}
             at ./compiler/rustc_hir_analysis/src/lib.rs:256:29
  45: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}
             at ./compiler/rustc_middle/src/hir/map.rs:341:79
  46: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:181:30
  47: <core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/panic/unwind_safe.rs:274:9
  48: std::panicking::catch_unwind::do_call::<core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>, ()>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:581:40
  49: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:544:19
  50: std::panic::catch_unwind::<core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>, ()>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panic.rs:359:14
  51: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:23:9
  52: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:181:23
  53: <core::slice::iter::Iter<rustc_span::def_id::LocalDefId> as core::iter::traits::iterator::Iterator>::for_each::<rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}::{closure#1}>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/slice/iter/macros.rs:301:21
  54: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:180:27
  55: rustc_data_structures::sync::parallel::parallel_guard::<(), rustc_data_structures::sync::parallel::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>::{closure#0}>
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:39:15
  56: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_hir_analysis::check_crate::{closure#2}>::{closure#0}>
             at ./compiler/rustc_data_structures/src/sync/parallel.rs:175:5
  57: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis::check_crate::{closure#2}>
             at ./compiler/rustc_middle/src/hir/map.rs:341:9
  58: rustc_hir_analysis::check_crate
             at ./compiler/rustc_hir_analysis/src/lib.rs:231:9
  59: rustc_interface::passes::run_required_analyses
             at ./compiler/rustc_interface/src/passes.rs:1088:5
  60: rustc_interface::passes::analysis
             at ./compiler/rustc_interface/src/passes.rs:1144:5
  61: rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}
             at ./compiler/rustc_query_impl/src/plumbing.rs:298:9
      [... omitted 22 frames ...]
  62: rustc_middle::query::inner::query_ensure::<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 0]>>>
             at ./compiler/rustc_middle/src/query/inner.rs:51:9
  63: <rustc_middle::query::plumbing::TyCtxtEnsureOk>::analysis
             at ./compiler/rustc_middle/src/query/plumbing.rs:173:9
  64: rustc_driver_impl::run_compiler::{closure#0}::{closure#2}
             at ./compiler/rustc_driver_impl/src/lib.rs:367:29
  65: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
             at ./compiler/rustc_interface/src/passes.rs:1020:27
  66: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}
             at ./compiler/rustc_middle/src/ty/context.rs:1652:37
  67: rustc_middle::ty::context::tls::enter_context::<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}
             at ./compiler/rustc_middle/src/ty/context/tls.rs:60:9
  68: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::try_with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/thread/local.rs:513:12
  69: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/thread/local.rs:477:20
  70: rustc_middle::ty::context::tls::enter_context::<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>
             at ./compiler/rustc_middle/src/ty/context/tls.rs:57:9
  71: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
             at ./compiler/rustc_middle/src/ty/context.rs:1652:9
  72: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
             at ./compiler/rustc_middle/src/ty/context.rs:1859:13
  73: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}
             at ./compiler/rustc_interface/src/passes.rs:987:9
  74: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/ops/function.rs:250:5
  75: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/alloc/src/boxed.rs:2206:9
  76: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
             at ./compiler/rustc_interface/src/passes.rs:1028:5
  77: rustc_driver_impl::run_compiler::{closure#0}
             at ./compiler/rustc_driver_impl/src/lib.rs:340:22
  78: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}
             at ./compiler/rustc_interface/src/interface.rs:543:80
  79: <core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/core/src/panic/unwind_safe.rs:274:9
  80: std::panicking::catch_unwind::do_call::<core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>, ()>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:581:40
  81: std::panicking::catch_unwind::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panicking.rs:544:19
  82: std::panic::catch_unwind::<core::panic::unwind_safe::AssertUnwindSafe<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}::{closure#0}>, ()>
             at /rustc/1b6e21e163baa0b20f119e17e3871910978a60b6/library/std/src/panic.rs:359:14
  83: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
             at ./compiler/rustc_interface/src/interface.rs:543:23
  84: 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}
             at ./compiler/rustc_interface/src/util.rs:209:17
  85: 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#0}
             at ./compiler/rustc_interface/src/util.rs:163:24
  86: <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<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
             at /home/gh-bjorn3/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/scoped-tls-1.0.1/src/lib.rs:137:9
  87: rustc_span::create_session_globals_then::<(), 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#0}>
             at ./compiler/rustc_span/src/lib.rs:143:21
  88: 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}
             at ./compiler/rustc_interface/src/util.rs:159:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

note: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/gh-bjorn3/rust/rustc-ice-2025-12-27T17_42_27-4070083.txt` to your bug report

note: rustc 1.94.0-dev running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type dylib -C opt-level=3 -C embed-bitcode=no -C debuginfo=1 -C debug-assertions=on -C overflow-checks=off -C symbol-mangling-version=v0 -Z annotate-moves -Z unstable-options -Z force-unstable-if-unmarked -Z macro-backtrace -C split-debuginfo=off -C link-arg=-L/home/gh-bjorn3/rust/build/aarch64-unknown-linux-gnu/ci-llvm/lib -C force-frame-pointers=true -C llvm-args=-import-instr-limit=10 -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C linker-features=+lld -C link-self-contained=+linker -Z unstable-options -Z unstable-options -Z binary-dep-depinfo -Z on-broken-pipe=kill -Z force-unstable-if-unmarked

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

query stack during panic:
#0 [typeck] type-checking `intrinsic::codegen_llvm_intrinsic_call`
#1 [analysis] running analysis passes on crate `rustc_codegen_gcc`
end of query stack
note: Clippy version: clippy 0.1.94 (813fa6ca7a 2025-12-27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions