rust-lang / rust-lang/rust

[ICE]: builtin: `no entry found for key`

Open
#153,005 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug F-non_lifetime_binders I-ICE S-bug-has-test S-has-mcve T-compiler
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

snippet:

#![feature(non_lifetime_binders)]
#![feature(derive_coerce_pointee)]

#[derive(core::marker::CoercePointee)]
#[repr(transparent)]
struct _Ptr5<'a, #[pointee] T: ?Sized, X>
where
    for<V> V: Sized,
{
    data: &'a T,
    x: core::marker::PhantomData<X>,
}

fn main() {}

Version information

rustc 1.95.0-nightly (1500f0f47 2026-02-22)
binary: rustc
commit-hash: 1500f0f47f5fe8ddcd6528f6c6c031b210b4eac5
commit-date: 2026-02-22
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 22.1.0

Possibly related line of code:
https://github.com/rust-lang/rust/blob/1500f0f47f5fe8ddcd6528f6c6c031b210b4eac5/compiler/rustc_lint/src/builtin.rs#L2123-L2135

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

Program output

warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /tmp/icemaker_global_tempdir.KTL1jjCwUirK/rustc_testrunner_tmpdir_reporting.0pS52XrH28EG/mvce.rs:1:12
  |
1 | #![feature(non_lifetime_binders)]
  |            ^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
  = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' (435403) panicked at /rustc-dev/1500f0f47f5fe8ddcd6528f6c6c031b210b4eac5/compiler/rustc_lint/src/builtin.rs:2129:82:
no entry found for key
stack backtrace:
   0:     0x7f71b2fb80eb - <<std[8fa6c4d7877d9fa6]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[8d2c922a005dfed9]::fmt::Display>::fmt
   1:     0x7f71b3621648 - core[8d2c922a005dfed9]::fmt::write
   2:     0x7f71b2fcf0f6 - <std[8fa6c4d7877d9fa6]::sys::stdio::unix::Stderr as std[8fa6c4d7877d9fa6]::io::Write>::write_fmt
   3:     0x7f71b2f8e1d8 - std[8fa6c4d7877d9fa6]::panicking::default_hook::{closure#0}
   4:     0x7f71b2fab553 - std[8fa6c4d7877d9fa6]::panicking::default_hook
   5:     0x7f71b1f84080 - std[8fa6c4d7877d9fa6]::panicking::update_hook::<alloc[e536beed0316d181]::boxed::Box<rustc_driver_impl[f1389595c05d78d8]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f71b2fab832 - std[8fa6c4d7877d9fa6]::panicking::panic_with_hook
   7:     0x7f71b2f8e298 - std[8fa6c4d7877d9fa6]::panicking::panic_handler::{closure#0}
   8:     0x7f71b2f84fe9 - std[8fa6c4d7877d9fa6]::sys::backtrace::__rust_end_short_backtrace::<std[8fa6c4d7877d9fa6]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f71b2f8fcfd - __rustc[d7af78fd024a5d6e]::rust_begin_unwind
  10:     0x7f71b03ed78c - core[8d2c922a005dfed9]::panicking::panic_fmt
  11:     0x7f71b0908d54 - core[8d2c922a005dfed9]::option::expect_failed
  12:     0x7f71b3e9970c - <rustc_lint[9cd29c06b98b2fa7]::builtin::ExplicitOutlivesRequirements as rustc_lint[9cd29c06b98b2fa7]::passes::LateLintPass>::check_item
  13:     0x7f71b3e962e4 - <rustc_lint[9cd29c06b98b2fa7]::BuiltinCombinedModuleLateLintPass as rustc_lint[9cd29c06b98b2fa7]::passes::LateLintPass>::check_item
  14:     0x7f71b3e880b4 - <rustc_lint[9cd29c06b98b2fa7]::late::LateContextAndPass<rustc_lint[9cd29c06b98b2fa7]::BuiltinCombinedModuleLateLintPass> as rustc_hir[d032c852da3aa8c5]::intravisit::Visitor>::visit_nested_item
  15:     0x7f71b3e869ed - rustc_lint[9cd29c06b98b2fa7]::lint_mod
  16:     0x7f71b45c7304 - rustc_query_impl[cec139e1f3385ac4]::execution::try_execute_query::<rustc_middle[60c2cf3af82b0a08]::query::caches::DefaultCache<rustc_span[8a11d63785993c5a]::def_id::LocalModDefId, rustc_middle[60c2cf3af82b0a08]::query::erase::ErasedData<[u8; 0usize]>>, {rustc_query_impl[cec139e1f3385ac4]::QueryFlags { is_anon: false, is_depth_limit: false, is_feedable: false }}, false>
  17:     0x7f71b45c7099 - rustc_query_impl[cec139e1f3385ac4]::query_impl::lint_mod::get_query_non_incr::__rust_end_short_backtrace
  18:     0x7f71b45c8350 - rustc_lint[9cd29c06b98b2fa7]::late::check_crate::{closure#1}
  19:     0x7f71b45c7f3a - rustc_lint[9cd29c06b98b2fa7]::late::check_crate
  20:     0x7f71b45c53c4 - rustc_interface[b6ce98af9df5606d]::passes::analysis::{closure#0}::{closure#0}::{closure#2}
  21:     0x7f71b45c51a5 - rustc_data_structures[1a0237db0a3cda6a]::sync::parallel::par_fns
  22:     0x7f71b45c5142 - rustc_interface[b6ce98af9df5606d]::passes::analysis::{closure#0}::{closure#0}
  23:     0x7f71b45c51a5 - rustc_data_structures[1a0237db0a3cda6a]::sync::parallel::par_fns
  24:     0x7f71b3db53b8 - rustc_interface[b6ce98af9df5606d]::passes::analysis
  25:     0x7f71b47e1499 - rustc_query_impl[cec139e1f3385ac4]::execution::try_execute_query::<rustc_middle[60c2cf3af82b0a08]::query::caches::SingleCache<rustc_middle[60c2cf3af82b0a08]::query::erase::ErasedData<[u8; 0usize]>>, {rustc_query_impl[cec139e1f3385ac4]::QueryFlags { is_anon: false, is_depth_limit: false, is_feedable: false }}, false>
  26:     0x7f71b47e10c8 - rustc_query_impl[cec139e1f3385ac4]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7f71b482088b - rustc_interface[b6ce98af9df5606d]::interface::run_compiler::<(), rustc_driver_impl[f1389595c05d78d8]::run_compiler::{closure#0}>::{closure#1}
  28:     0x7f71b47d09fe - std[8fa6c4d7877d9fa6]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[b6ce98af9df5606d]::util::run_in_thread_with_globals<rustc_interface[b6ce98af9df5606d]::util::run_in_thread_pool_with_globals<rustc_interface[b6ce98af9df5606d]::interface::run_compiler<(), rustc_driver_impl[f1389595c05d78d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  29:     0x7f71b47d10e0 - <std[8fa6c4d7877d9fa6]::thread::lifecycle::spawn_unchecked<rustc_interface[b6ce98af9df5606d]::util::run_in_thread_with_globals<rustc_interface[b6ce98af9df5606d]::util::run_in_thread_pool_with_globals<rustc_interface[b6ce98af9df5606d]::interface::run_compiler<(), rustc_driver_impl[f1389595c05d78d8]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[8d2c922a005dfed9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7f71b47d1f6c - <std[8fa6c4d7877d9fa6]::sys::thread::unix::Thread>::new::thread_start
  31:     0x7f71ae2a598b - <unknown>
  32:     0x7f71ae329a0c - <unknown>
  33:                0x0 - <unknown>

error: the compiler unexpectedly panicked. This is a bug

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.95.0-nightly (1500f0f47 2026-02-22) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [lint_mod] linting top-level module
#1 [analysis] running analysis passes on crate `mvce`
end of query stack
warning: 1 warning emitted


@rustbot label +F-non_lifetime_binders +F-derive_coerce_pointee

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the ICE with the Rust snippet and inspect compiler/rustc_lint/src/builtin.rs around lines 2123-2135, especially ExplicitOutlivesRequirements::check_item from the stack trace. Confirm that the input no longer makes rustc panic during linting and that the resulting compiler behavior is covered by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.