Skip to content

[ICE]: no entry for node id #156806

@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

trait X {}

impl X {
    reuse Iterator::fold {
		let _: &X;
    }
}

original:

#![feature(fn_delegation)]
trait X {}

impl X {
    reuse Iterator::fold {
		let _: &X;
    }
}

Version information

rustc 1.97.0-nightly (b954122bb 2026-05-20)
binary: rustc
commit-hash: b954122bbe6c4a244c511a9a168c6d5438d8f58f
commit-date: 2026-05-20
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.4

Possibly related line of code:

let actual_owner = items.node_id_to_def_id.get(id);
panic!("{def_id:?} ({node_id}) was found in {actual_owner:?} ({id})",)
}
false
})
});
panic!("no entry for node id: `{node:?}`");
})
}
fn get_partial_res(&self, id: NodeId) -> Option<PartialRes> {
match self.partial_res_overrides.get(&id) {
Some(self_param_id) => Some(PartialRes::new(Res::Local(*self_param_id))),

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

Program output

error[E0658]: functions delegation is not yet fully implemented
 --> /tmp/icemaker_global_tempdir.i5tRtAV11AVg/rustc_testrunner_tmpdir_reporting.q39cQrbGUCpM/mvce.rs:4:5
  |
4 | /     reuse Iterator::fold {
5 | |         let _: &X;
6 | |     }
  | |_____^
  |
  = note: see issue #118212 <https://github.com/rust-lang/rust/issues/118212> for more information
  = help: add `#![feature(fn_delegation)]` to the crate attributes to enable
  = note: this compiler was built on 2026-05-20; consider upgrading it if it is out of date


thread 'rustc' (1032756) panicked at /rustc-dev/b954122bbe6c4a244c511a9a168c6d5438d8f58f/compiler/rustc_ast_lowering/src/lib.rs:684:13:
no entry for node id: `NodeId(24)`
stack backtrace:
   0:     0x7ff5ce89afb9 - <<std[9b1fefb192d7dcdd]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[8f1d9dc20add8ccc]::fmt::Display>::fmt
   1:     0x7ff5cf01fc88 - core[8f1d9dc20add8ccc]::fmt::write
   2:     0x7ff5ce8b1ca6 - <std[9b1fefb192d7dcdd]::sys::stdio::unix::Stderr as std[9b1fefb192d7dcdd]::io::Write>::write_fmt
   3:     0x7ff5ce8711de - std[9b1fefb192d7dcdd]::panicking::default_hook::{closure#0}
   4:     0x7ff5ce88e8f3 - std[9b1fefb192d7dcdd]::panicking::default_hook
   5:     0x7ff5cd68d5a1 - std[9b1fefb192d7dcdd]::panicking::update_hook::<alloc[cf25b8836bdc34f1]::boxed::Box<rustc_driver_impl[95c61dc90027d8c1]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7ff5ce88ebd2 - std[9b1fefb192d7dcdd]::panicking::panic_with_hook
   7:     0x7ff5ce8712a2 - std[9b1fefb192d7dcdd]::panicking::panic_handler::{closure#0}
   8:     0x7ff5ce8657c9 - std[9b1fefb192d7dcdd]::sys::backtrace::__rust_end_short_backtrace::<std[9b1fefb192d7dcdd]::panicking::panic_handler::{closure#0}, !>
   9:     0x7ff5ce872d0d - __rustc[643a9a89e4a1a7a2]::rust_begin_unwind
  10:     0x7ff5cb19438c - core[8f1d9dc20add8ccc]::panicking::panic_fmt
  11:     0x7ff5cf1d2b10 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::new_named_lifetime
  12:     0x7ff5cf1d3dd1 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::lower_ty
  13:     0x7ff5cf750817 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::lower_stmts
  14:     0x7ff5cf77b306 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::lower_block
  15:     0x7ff5cd1812a2 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::lower_target_expr
  16:     0x7ff5cd17dae4 - <rustc_ast_lowering[6fb7a663fca20012]::LoweringContext>::lower_delegation
  17:     0x7ff5cfa471aa - <rustc_ast_lowering[6fb7a663fca20012]::item::ItemLowerer>::lower_node
  18:     0x7ff5cd17be4b - rustc_ast_lowering[6fb7a663fca20012]::lower_delayed_owner
  19:     0x7ff5cf2a57ae - rustc_query_impl[2fa820134a6ba49a]::execution::try_execute_query::<rustc_data_structures[ea7f2117d5faad46]::vec_cache::VecCache<rustc_span[5bdacda662c6a8f1]::def_id::LocalDefId, rustc_middle[dee0145e95396fd4]::query::erase::ErasedData<[u8; 0usize]>, rustc_middle[dee0145e95396fd4]::dep_graph::graph::DepNodeIndex>, false>
  20:     0x7ff5ce27bb6b - rustc_query_impl[2fa820134a6ba49a]::query_impl::lower_delayed_owner::execute_query_non_incr::__rust_end_short_backtrace
  21:     0x7ff5d032286c - rustc_middle[dee0145e95396fd4]::hir::map::hir_crate_items
  22:     0x7ff5d01a11d9 - rustc_query_impl[2fa820134a6ba49a]::query_impl::hir_crate_items::invoke_provider_fn::__rust_begin_short_backtrace
  23:     0x7ff5d01a5c71 - rustc_query_impl[2fa820134a6ba49a]::execution::try_execute_query::<rustc_middle[dee0145e95396fd4]::query::caches::SingleCache<rustc_middle[dee0145e95396fd4]::query::erase::ErasedData<[u8; 8usize]>>, false>
  24:     0x7ff5d01a6f43 - rustc_query_impl[2fa820134a6ba49a]::query_impl::hir_crate_items::execute_query_non_incr::__rust_end_short_backtrace
  25:     0x7ff5cf2a2dd8 - rustc_interface[f0cd769d5a742462]::passes::analysis
  26:     0x7ff5d01a6849 - rustc_query_impl[2fa820134a6ba49a]::execution::try_execute_query::<rustc_middle[dee0145e95396fd4]::query::caches::SingleCache<rustc_middle[dee0145e95396fd4]::query::erase::ErasedData<[u8; 0usize]>>, false>
  27:     0x7ff5d01a6529 - rustc_query_impl[2fa820134a6ba49a]::query_impl::analysis::execute_query_non_incr::__rust_end_short_backtrace
  28:     0x7ff5d0157e5b - rustc_interface[f0cd769d5a742462]::interface::run_compiler::<(), rustc_driver_impl[95c61dc90027d8c1]::run_compiler::{closure#0}>::{closure#1}
  29:     0x7ff5d01910c0 - std[9b1fefb192d7dcdd]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[f0cd769d5a742462]::util::run_in_thread_with_globals<rustc_interface[f0cd769d5a742462]::util::run_in_thread_pool_with_globals<rustc_interface[f0cd769d5a742462]::interface::run_compiler<(), rustc_driver_impl[95c61dc90027d8c1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  30:     0x7ff5d01917ad - <std[9b1fefb192d7dcdd]::thread::lifecycle::spawn_unchecked<rustc_interface[f0cd769d5a742462]::util::run_in_thread_with_globals<rustc_interface[f0cd769d5a742462]::util::run_in_thread_pool_with_globals<rustc_interface[f0cd769d5a742462]::interface::run_compiler<(), rustc_driver_impl[95c61dc90027d8c1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[8f1d9dc20add8ccc]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7ff5d01925ac - <std[9b1fefb192d7dcdd]::sys::thread::unix::Thread>::new::thread_start
  32:     0x7ff5c96981b9 - <unknown>
  33:     0x7ff5c971d21c - <unknown>
  34:                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.97.0-nightly (b954122bb 2026-05-20) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [lower_delayed_owner] lowering the delayed AST owner `<impl at /tmp/icemaker_global_tempdir.i5tRtAV11AVg/rustc_testrunner_tmpdir_reporting.q39cQrbGUCpM/mvce.rs:3:1: 3:7>::fold`
#1 [hir_crate_items] getting HIR crate items
#2 [analysis] running analysis passes on crate `mvce`
end of query stack
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0658`.

@rustbot label +F-fn_delegation

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-fn_delegation`#![feature(fn_delegation)]`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.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions