Skip to content

ICE: LocalTableInContext: key not found #142525

Closed
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

use std::arch::x86_64::_mm_blend_ps;

pub fn main() {
     _mm_blend_ps(3_usize, 2, &[
    Exhibit {
        ,
        factory: |_| unimplemented!(),
    },
    Exhibit {
        ,
        ,
    },
] );
}

original:

use std::arch::x86_64::_mm_blend_ps;

pub fn main() {
     _mm_blend_ps(3_usize, 2, &[
    Exhibit {
        constant: 1,
        factory: |_| unimplemented!(),
    },
    Exhibit {
        constant: "Hello world".len(),
        factory: |_| unimplemented!(),
    },
] );
}

Version information

rustc 1.89.0-nightly (32b51523f 2025-06-15)
binary: rustc
commit-hash: 32b51523f81a5f916c4bb3fee5a749721f19e01d
commit-date: 2025-06-15
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

error: expected identifier, found `,`
 --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:6:9
  |
5 |     Exhibit {
  |     ------- while parsing this struct
6 |         ,
  |         ^ expected identifier
  |
help: remove this comma
  |
6 -         ,
  |

error: expected identifier, found `,`
  --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:10:9
   |
9  |     Exhibit {
   |     ------- while parsing this struct
10 |         ,
   |         ^ expected identifier

error: expected identifier, found `,`
  --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:11:9
   |
9  |     Exhibit {
   |     ------- while parsing this struct
10 |         ,
11 |         ,
   |         ^ expected identifier

error[E0422]: cannot find struct, variant or union type `Exhibit` in this scope
 --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:5:5
  |
5 |     Exhibit {
  |     ^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type `Exhibit` in this scope
 --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:9:5
  |
9 |     Exhibit {
  |     ^^^^^^^ not found in this scope

error[E0308]: arguments to this function are incorrect
   --> /tmp/icemaker_global_tempdir.shyi2WjDizfE/rustc_testrunner_tmpdir_reporting.JV8NN60yvR7w/mvce.rs:4:6
    |
4   |      _mm_blend_ps(3_usize, 2, &[
    |      ^^^^^^^^^^^^ -------  - expected `__m128`, found integer
    |                   |
    |                   expected `__m128`, found `usize`
    |
note: function defined here
   --> /home/matthias/.rustup/toolchains/master/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse41.rs:163:8
    |
163 | pub fn _mm_blend_ps<const IMM4: i32>(a: __m128, b: __m128) -> __m128 {
    |        ^^^^^^^^^^^^

error: internal compiler error: /rustc-dev/32b51523f81a5f916c4bb3fee5a749721f19e01d/compiler/rustc_middle/src/ty/typeck_results.rs:617:13: LocalTableInContext(DefId(0:4 ~ mvce[f249]::main)): key HirId(DefId(0:4 ~ mvce[f249]::main).10) not found


thread 'rustc' panicked at /rustc-dev/32b51523f81a5f916c4bb3fee5a749721f19e01d/compiler/rustc_middle/src/ty/typeck_results.rs:617:13:
Box<dyn Any>
stack backtrace:
   0:     0x77a14e111113 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h46626ed9cd3e56f7
   1:     0x77a14e802ff7 - core::fmt::write::h4d2e5b237511068d
   2:     0x77a14e106c43 - std::io::Write::write_fmt::h0a6d08649f6b4794
   3:     0x77a14e110f72 - std::sys::backtrace::BacktraceLock::print::h5062aa0b611b50d5
   4:     0x77a14e114b5a - std::panicking::default_hook::{{closure}}::h0e15a59178351623
   5:     0x77a14e1146df - std::panicking::default_hook::h3ec2990fcc64ffed
   6:     0x77a14d203093 - std[808e806d5b2b7162]::panicking::update_hook::<alloc[ab15aa01d122754d]::boxed::Box<rustc_driver_impl[65ab2425e8009d2a]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x77a14e1153c3 - std::panicking::rust_panic_with_hook::h81cd226d4be5cbf8
   8:     0x77a14d240701 - std[808e806d5b2b7162]::panicking::begin_panic::<rustc_errors[62cc3ed152ddb7e4]::ExplicitBug>::{closure#0}
   9:     0x77a14d234d46 - std[808e806d5b2b7162]::sys::backtrace::__rust_end_short_backtrace::<std[808e806d5b2b7162]::panicking::begin_panic<rustc_errors[62cc3ed152ddb7e4]::ExplicitBug>::{closure#0}, !>
  10:     0x77a14d234b23 - std[808e806d5b2b7162]::panicking::begin_panic::<rustc_errors[62cc3ed152ddb7e4]::ExplicitBug>
  11:     0x77a14d24a141 - <rustc_errors[62cc3ed152ddb7e4]::diagnostic::BugAbort as rustc_errors[62cc3ed152ddb7e4]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:     0x77a14d80ea3a - rustc_middle[54c0bfeda72395ed]::util::bug::opt_span_bug_fmt::<rustc_span[a83c2a3226fb7137]::span_encoding::Span>::{closure#0}
  13:     0x77a14d7ee51a - rustc_middle[54c0bfeda72395ed]::ty::context::tls::with_opt::<rustc_middle[54c0bfeda72395ed]::util::bug::opt_span_bug_fmt<rustc_span[a83c2a3226fb7137]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x77a14d7ee38b - rustc_middle[54c0bfeda72395ed]::ty::context::tls::with_context_opt::<rustc_middle[54c0bfeda72395ed]::ty::context::tls::with_opt<rustc_middle[54c0bfeda72395ed]::util::bug::opt_span_bug_fmt<rustc_span[a83c2a3226fb7137]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x77a14a8976f0 - rustc_middle[54c0bfeda72395ed]::util::bug::bug_fmt
  16:     0x77a14f24a572 - rustc_mir_build[27ba85c1db70c283]::thir::cx::thir_body
  17:     0x77a14f2489e0 - rustc_query_impl[86f3072600f97609]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86f3072600f97609]::query_impl::thir_body::dynamic_query::{closure#2}::{closure#0}, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 16usize]>>
  18:     0x77a14f234c82 - rustc_query_system[d6ca0e24d754464]::query::plumbing::try_execute_query::<rustc_query_impl[86f3072600f97609]::DynamicConfig<rustc_data_structures[17a0ca3b0fe088c]::vec_cache::VecCache<rustc_span[a83c2a3226fb7137]::def_id::LocalDefId, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 16usize]>, rustc_query_system[d6ca0e24d754464]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[86f3072600f97609]::plumbing::QueryCtxt, false>
  19:     0x77a14f2348cc - rustc_query_impl[86f3072600f97609]::query_impl::thir_body::get_query_non_incr::__rust_end_short_backtrace
  20:     0x77a14ecbf16b - rustc_mir_build[27ba85c1db70c283]::thir::pattern::check_match::check_match
  21:     0x77a14ecbe48f - rustc_query_impl[86f3072600f97609]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86f3072600f97609]::query_impl::check_match::dynamic_query::{closure#2}::{closure#0}, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 1usize]>>
  22:     0x77a14efc6139 - rustc_query_system[d6ca0e24d754464]::query::plumbing::try_execute_query::<rustc_query_impl[86f3072600f97609]::DynamicConfig<rustc_data_structures[17a0ca3b0fe088c]::vec_cache::VecCache<rustc_span[a83c2a3226fb7137]::def_id::LocalDefId, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[d6ca0e24d754464]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[86f3072600f97609]::plumbing::QueryCtxt, false>
  23:     0x77a14efc5d7d - rustc_query_impl[86f3072600f97609]::query_impl::check_match::get_query_non_incr::__rust_end_short_backtrace
  24:     0x77a14ed457df - rustc_mir_build[27ba85c1db70c283]::builder::build_mir
  25:     0x77a14e8087f5 - rustc_mir_transform[47b06709e801ddd3]::mir_built
  26:     0x77a14e8087c7 - rustc_query_impl[86f3072600f97609]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86f3072600f97609]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 8usize]>>
  27:     0x77a14ea1aeee - rustc_query_system[d6ca0e24d754464]::query::plumbing::try_execute_query::<rustc_query_impl[86f3072600f97609]::DynamicConfig<rustc_data_structures[17a0ca3b0fe088c]::vec_cache::VecCache<rustc_span[a83c2a3226fb7137]::def_id::LocalDefId, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[d6ca0e24d754464]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[86f3072600f97609]::plumbing::QueryCtxt, false>
  28:     0x77a14ea1aa09 - rustc_query_impl[86f3072600f97609]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  29:     0x77a14e8261b8 - rustc_mir_transform[47b06709e801ddd3]::ffi_unwind_calls::has_ffi_unwind_calls
  30:     0x77a14e825bb7 - rustc_query_impl[86f3072600f97609]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86f3072600f97609]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 1usize]>>
  31:     0x77a14efc6139 - rustc_query_system[d6ca0e24d754464]::query::plumbing::try_execute_query::<rustc_query_impl[86f3072600f97609]::DynamicConfig<rustc_data_structures[17a0ca3b0fe088c]::vec_cache::VecCache<rustc_span[a83c2a3226fb7137]::def_id::LocalDefId, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 1usize]>, rustc_query_system[d6ca0e24d754464]::dep_graph::graph::DepNodeIndex>, false, false, false>, rustc_query_impl[86f3072600f97609]::plumbing::QueryCtxt, false>
  32:     0x77a14efc5e11 - rustc_query_impl[86f3072600f97609]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  33:     0x77a14ea19894 - <rustc_middle[54c0bfeda72395ed]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface[bb24fe0bfe452ad9]::passes::run_required_analyses::{closure#1}::{closure#0}>::{closure#0}
  34:     0x77a14ea17168 - rustc_interface[bb24fe0bfe452ad9]::passes::analysis
  35:     0x77a14ea16633 - rustc_query_impl[86f3072600f97609]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[86f3072600f97609]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 0usize]>>
  36:     0x77a14f86250e - rustc_query_system[d6ca0e24d754464]::query::plumbing::try_execute_query::<rustc_query_impl[86f3072600f97609]::DynamicConfig<rustc_query_system[d6ca0e24d754464]::query::caches::SingleCache<rustc_middle[54c0bfeda72395ed]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[86f3072600f97609]::plumbing::QueryCtxt, false>
  37:     0x77a14f862202 - rustc_query_impl[86f3072600f97609]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  38:     0x77a14fb594d9 - rustc_interface[bb24fe0bfe452ad9]::passes::create_and_enter_global_ctxt::<core[63e14f5addbcdb87]::option::Option<rustc_interface[bb24fe0bfe452ad9]::queries::Linker>, rustc_driver_impl[65ab2425e8009d2a]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
  39:     0x77a14fb4a849 - rustc_interface[bb24fe0bfe452ad9]::interface::run_compiler::<(), rustc_driver_impl[65ab2425e8009d2a]::run_compiler::{closure#0}>::{closure#1}
  40:     0x77a14fa18bf2 - std[808e806d5b2b7162]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[bb24fe0bfe452ad9]::util::run_in_thread_with_globals<rustc_interface[bb24fe0bfe452ad9]::util::run_in_thread_pool_with_globals<rustc_interface[bb24fe0bfe452ad9]::interface::run_compiler<(), rustc_driver_impl[65ab2425e8009d2a]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  41:     0x77a14fa188e4 - <<std[808e806d5b2b7162]::thread::Builder>::spawn_unchecked_<rustc_interface[bb24fe0bfe452ad9]::util::run_in_thread_with_globals<rustc_interface[bb24fe0bfe452ad9]::util::run_in_thread_pool_with_globals<rustc_interface[bb24fe0bfe452ad9]::interface::run_compiler<(), rustc_driver_impl[65ab2425e8009d2a]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[63e14f5addbcdb87]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x77a14fa16efd - std::sys::pal::unix::thread::Thread::new::thread_start::hea2dda47b7cb7070
  43:     0x77a1494a57eb - <unknown>
  44:     0x77a14952918c - <unknown>
  45:                0x0 - <unknown>

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: rustc 1.89.0-nightly (32b51523f 2025-06-15) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [thir_body] building THIR for `main::{closure#0}`
#1 [check_match] match-checking `main::{closure#0}`
#2 [mir_built] building MIR for `main::{closure#0}`
#3 [has_ffi_unwind_calls] checking if `main::{closure#0}` contains FFI-unwind calls
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 7 previous errors

Some errors have detailed explanations: E0308, E0422.
For more information about an error, try `rustc --explain E0308`.

Metadata

Metadata

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions