Skip to content

ICE: no entry for node id: 'NodeId(53)' #122903

Open
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

impl Struct {
    async fn box_box_ref_Struct(
        self: Box<Box<Self, impl FnMut(&mut Box<Box<Self, impl FnMut(&mut Self)>>)>>,
    ) -> &u32 {
        f
    }
}

original:

impl Struct {
    async fn box_box_ref_Struct(self: Box<Box<Self, impl FnMut(&mut Box<Box<Self, impl FnMut(&mut Self)>>)>>) -> &u32 {
        f
    }
}

Version information

rustc 1.79.0-nightly (b3df0d7e5 2024-03-22)
binary: rustc
commit-hash: b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87
commit-date: 2024-03-22
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.2

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

Program output

error[E0670]: `async fn` is not permitted in Rust 2015
 --> /tmp/icemaker_global_tempdir.13jse2WQq2WY/rustc_testrunner_tmpdir_reporting.UjIokzyPm1t9/mvce.rs:2:5
  |
2 |     async fn box_box_ref_Struct(
  |     ^^^^^ to use `async fn`, switch to Rust 2018 or later
  |
  = help: pass `--edition 2021` to `rustc`
  = note: for more on editions, read https://doc.rust-lang.org/edition-guide

error[E0666]: nested `impl Trait` is not allowed
 --> /tmp/icemaker_global_tempdir.13jse2WQq2WY/rustc_testrunner_tmpdir_reporting.UjIokzyPm1t9/mvce.rs:3:59
  |
3 |         self: Box<Box<Self, impl FnMut(&mut Box<Box<Self, impl FnMut(&mut Self)>>)>>,
  |                             ------------------------------^^^^^^^^^^^^^^^^^^^^^---
  |                             |                             |
  |                             |                             nested `impl Trait` here
  |                             outer `impl Trait`

error[E0412]: cannot find type `Struct` in this scope
 --> /tmp/icemaker_global_tempdir.13jse2WQq2WY/rustc_testrunner_tmpdir_reporting.UjIokzyPm1t9/mvce.rs:1:6
  |
1 | impl Struct {
  |      ^^^^^^ not found in this scope

error[E0425]: cannot find value `f` in this scope
 --> /tmp/icemaker_global_tempdir.13jse2WQq2WY/rustc_testrunner_tmpdir_reporting.UjIokzyPm1t9/mvce.rs:5:9
  |
5 |         f
  |         ^ not found in this scope

error[E0562]: `impl Trait` is not allowed in the parameters of `Fn` trait bounds
 --> /tmp/icemaker_global_tempdir.13jse2WQq2WY/rustc_testrunner_tmpdir_reporting.UjIokzyPm1t9/mvce.rs:3:59
  |
3 |         self: Box<Box<Self, impl FnMut(&mut Box<Box<Self, impl FnMut(&mut Self)>>)>>,
  |                                                           ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `impl Trait` is only allowed in arguments and return types of functions and methods

thread 'rustc' panicked at compiler/rustc_ast_lowering/src/lib.rs:531:55:
no entry for node id: `NodeId(51)`
stack backtrace:
   0:     0x76d7725a0fa5 - std::backtrace_rs::backtrace::libunwind::trace::h4515e3e00f57996f
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x76d7725a0fa5 - std::backtrace_rs::backtrace::trace_unsynchronized::h1e64ac1112175e4e
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x76d7725a0fa5 - std::sys_common::backtrace::_print_fmt::h182160b5ad873150
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x76d7725a0fa5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h432843f19f8b2b6d
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x76d7725f1feb - core::fmt::rt::Argument::fmt::hb59bbd21accf1885
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/core/src/fmt/rt.rs:142:9
   5:     0x76d7725f1feb - core::fmt::write::haf243cf4605e411d
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/core/src/fmt/mod.rs:1153:17
   6:     0x76d772595d3f - std::io::Write::write_fmt::hd8c8c68b4f5b8f11
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/io/mod.rs:1843:15
   7:     0x76d7725a0d7e - std::sys_common::backtrace::_print::h0ec933d6103e5515
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x76d7725a0d7e - std::sys_common::backtrace::print::h55136fa64edb86e6
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x76d7725a39f9 - std::panicking::default_hook::{{closure}}::h28cbeefc01b40f52
  10:     0x76d7725a3763 - std::panicking::default_hook::h15e904210c67a3ca
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/panicking.rs:292:9
  11:     0x76d76edcb6bf - std[48784e9e46568672]::panicking::update_hook::<alloc[590c7545ac68a568]::boxed::Box<rustc_driver_impl[9e9e6466696ec967]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x76d7725a4150 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::had664932fcaf7f86
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/alloc/src/boxed.rs:2029:9
  13:     0x76d7725a4150 - std::panicking::rust_panic_with_hook::h9f23cc8a1f418825
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/panicking.rs:783:13
  14:     0x76d7725a3ea6 - std::panicking::begin_panic_handler::{{closure}}::h6c297ce5a3207845
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/panicking.rs:657:13
  15:     0x76d7725a1469 - std::sys_common::backtrace::__rust_end_short_backtrace::h7e27b03308c1610a
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x76d7725a3bd7 - rust_begin_unwind
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/panicking.rs:645:5
  17:     0x76d7725ee486 - core::panicking::panic_fmt::hc62934eef5acbd79
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/core/src/panicking.rs:72:14
  18:     0x76d770cf65de - <rustc_ast_lowering[a8530f55dbeea654]::LoweringContext>::lower_ty_direct
  19:     0x76d76ea993a1 - <rustc_ast_lowering[a8530f55dbeea654]::LoweringContext>::lower_ty
  20:     0x76d770cf3d4b - <rustc_ast_lowering[a8530f55dbeea654]::LoweringContext>::lower_fn_decl
  21:     0x76d770cf0297 - <rustc_ast_lowering[a8530f55dbeea654]::LoweringContext>::lower_method_sig
  22:     0x76d7706e85ca - <rustc_ast_lowering[a8530f55dbeea654]::LoweringContext>::lower_assoc_item
  23:     0x76d7706fadb7 - <rustc_ast_lowering[a8530f55dbeea654]::item::ItemLowerer>::lower_node
  24:     0x76d7706f7e56 - rustc_ast_lowering[a8530f55dbeea654]::lower_to_hir
  25:     0x76d770ff03a0 - rustc_query_impl[82a63e1d7cdec9a7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82a63e1d7cdec9a7]::query_impl::hir_crate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 8usize]>>
  26:     0x76d770fedff4 - rustc_query_system[ee3912bf2a9f33a7]::query::plumbing::try_execute_query::<rustc_query_impl[82a63e1d7cdec9a7]::DynamicConfig<rustc_query_system[ee3912bf2a9f33a7]::query::caches::SingleCache<rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[82a63e1d7cdec9a7]::plumbing::QueryCtxt, false>
  27:     0x76d770fedbe0 - rustc_query_impl[82a63e1d7cdec9a7]::query_impl::hir_crate::get_query_non_incr::__rust_end_short_backtrace
  28:     0x76d7709220c3 - rustc_query_impl[82a63e1d7cdec9a7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82a63e1d7cdec9a7]::query_impl::hir_attrs::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 8usize]>>
  29:     0x76d77092165b - rustc_query_system[ee3912bf2a9f33a7]::query::plumbing::try_execute_query::<rustc_query_impl[82a63e1d7cdec9a7]::DynamicConfig<rustc_query_system[ee3912bf2a9f33a7]::query::caches::VecCache<rustc_hir[a67f1a97fc26ff83]::hir_id::OwnerId, rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[82a63e1d7cdec9a7]::plumbing::QueryCtxt, false>
  30:     0x76d7709213c9 - rustc_query_impl[82a63e1d7cdec9a7]::query_impl::hir_attrs::get_query_non_incr::__rust_end_short_backtrace
  31:     0x76d7703b5b2a - <rustc_middle[cfd7f582085b2efd]::hir::map::Map>::attrs
  32:     0x76d771156903 - rustc_passes[6bc16bb8b9e07277]::entry::entry_fn
  33:     0x76d771156898 - rustc_query_impl[82a63e1d7cdec9a7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82a63e1d7cdec9a7]::query_impl::entry_fn::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 12usize]>>
  34:     0x76d771156873 - <rustc_query_impl[82a63e1d7cdec9a7]::query_impl::entry_fn::dynamic_query::{closure#2} as core[b4a1350c838fc0f9]::ops::function::FnOnce<(rustc_middle[cfd7f582085b2efd]::ty::context::TyCtxt, ())>>::call_once
  35:     0x76d77115618a - rustc_query_system[ee3912bf2a9f33a7]::query::plumbing::try_execute_query::<rustc_query_impl[82a63e1d7cdec9a7]::DynamicConfig<rustc_query_system[ee3912bf2a9f33a7]::query::caches::SingleCache<rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 12usize]>>, false, false, false>, rustc_query_impl[82a63e1d7cdec9a7]::plumbing::QueryCtxt, false>
  36:     0x76d771155f45 - rustc_query_impl[82a63e1d7cdec9a7]::query_impl::entry_fn::get_query_non_incr::__rust_end_short_backtrace
  37:     0x76d7706a002e - rustc_interface[7ddcde71cf02e108]::passes::analysis
  38:     0x76d77069fe51 - rustc_query_impl[82a63e1d7cdec9a7]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[82a63e1d7cdec9a7]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 1usize]>>
  39:     0x76d770feb4a5 - rustc_query_system[ee3912bf2a9f33a7]::query::plumbing::try_execute_query::<rustc_query_impl[82a63e1d7cdec9a7]::DynamicConfig<rustc_query_system[ee3912bf2a9f33a7]::query::caches::SingleCache<rustc_middle[cfd7f582085b2efd]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[82a63e1d7cdec9a7]::plumbing::QueryCtxt, false>
  40:     0x76d770feb209 - rustc_query_impl[82a63e1d7cdec9a7]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  41:     0x76d770e870d9 - rustc_interface[7ddcde71cf02e108]::interface::run_compiler::<core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>, rustc_driver_impl[9e9e6466696ec967]::run_compiler::{closure#0}>::{closure#0}
  42:     0x76d770f52399 - std[48784e9e46568672]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[7ddcde71cf02e108]::util::run_in_thread_with_globals<rustc_interface[7ddcde71cf02e108]::util::run_in_thread_pool_with_globals<rustc_interface[7ddcde71cf02e108]::interface::run_compiler<core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>, rustc_driver_impl[9e9e6466696ec967]::run_compiler::{closure#0}>::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>
  43:     0x76d770f521c6 - <<std[48784e9e46568672]::thread::Builder>::spawn_unchecked_<rustc_interface[7ddcde71cf02e108]::util::run_in_thread_with_globals<rustc_interface[7ddcde71cf02e108]::util::run_in_thread_pool_with_globals<rustc_interface[7ddcde71cf02e108]::interface::run_compiler<core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>, rustc_driver_impl[9e9e6466696ec967]::run_compiler::{closure#0}>::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b4a1350c838fc0f9]::result::Result<(), rustc_span[9e6cb2d6f72e9bb4]::ErrorGuaranteed>>::{closure#1} as core[b4a1350c838fc0f9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  44:     0x76d7725ad919 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3e016c41180ed802
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/alloc/src/boxed.rs:2015:9
  45:     0x76d7725ad919 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hcf0716ba35a33b0c
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/alloc/src/boxed.rs:2015:9
  46:     0x76d7725ad919 - std::sys::pal::unix::thread::Thread::new::thread_start::hd585680968d21553
                               at /rustc/b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87/library/std/src/sys/pal/unix/thread.rs:108:17
  47:     0x76d77234d55a - <unknown>
  48:     0x76d7723caa3c - <unknown>
  49:                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: rustc 1.79.0-nightly (b3df0d7e5 2024-03-22) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [hir_crate] getting the crate HIR
#1 [hir_attrs] getting HIR owner attributes in ``
#2 [entry_fn] looking up the entry function of a crate
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 5 previous errors

Some errors have detailed explanations: E0412, E0425, E0562, E0666, E0670.
For more information about an error, try `rustc --explain E0412`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions