Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: incr: no entry found for key #126516

Closed
matthiaskrgr opened this issue Jun 15, 2024 · 4 comments · Fixed by #126735
Closed

ICE: incr: no entry found for key #126516

matthiaskrgr opened this issue Jun 15, 2024 · 4 comments · Fixed by #126735
Labels
A-incr-comp Area: Incremental compilation A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. F-effects `#![feature(effects)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

const fn test() -> impl ~const  fn() {
    const { #![path = foo!()] }
}

Meta

rustc --version --verbose:

rustc 1.81.0-nightly (8217b412a 2024-06-15)
binary: rustc
commit-hash: 8217b412a235407243f2516ebc859e7b3af8345a
commit-date: 2024-06-15
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7

Error output

~/.rustup/toolchains/master/bin/rustc -Cincremental=. a.rs

<output>
Backtrace

error: expected identifier, found keyword `fn`
 --> a.rs:1:33
  |
1 | const fn test() -> impl ~const  fn() {
  |                                 ^^
  |
help: use `Fn` to refer to the trait (notice the capitalization difference)
  |
1 | const fn test() -> impl ~const  Fn() {
  |                                 ~~

thread 'rustc' panicked at compiler/rustc_resolve/src/macros.rs:176:32:
no entry found for key
stack backtrace:
   0:     0x799f24a68ae5 - std::backtrace_rs::backtrace::libunwind::trace::h3ce4b988cf764081
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x799f24a68ae5 - std::backtrace_rs::backtrace::trace_unsynchronized::h644386fb9b6d425c
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x799f24a68ae5 - std::sys_common::backtrace::_print_fmt::hbcb0591974d9d4b6
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x799f24a68ae5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfde42e5447c9921d
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x799f24ab977b - core::fmt::rt::Argument::fmt::h30fdc3acfe153665
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/core/src/fmt/rt.rs:165:63
   5:     0x799f24ab977b - core::fmt::write::h200fae6a9c1c5465
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/core/src/fmt/mod.rs:1168:21
   6:     0x799f24a5d6bf - std::io::Write::write_fmt::h5fdb7a30131da972
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/io/mod.rs:1835:15
   7:     0x799f24a688be - std::sys_common::backtrace::_print::hf65f993d1acacdf9
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x799f24a688be - std::sys_common::backtrace::print::h9357a66f85cf385d
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x799f24a6b2f9 - std::panicking::default_hook::{{closure}}::h0e9d547e65bc525c
  10:     0x799f24a6b09c - std::panicking::default_hook::h91e630649f44b46d
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/panicking.rs:292:9
  11:     0x799f212bc9c0 - std[dcc9197a679e7515]::panicking::update_hook::<alloc[32d4cfa2fa7835b6]::boxed::Box<rustc_driver_impl[5ac992c1e906279b]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x799f24a6bbff - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hbbd2e22c8b3436c1
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/alloc/src/boxed.rs:2076:9
  13:     0x799f24a6bbff - std::panicking::rust_panic_with_hook::h6087348979401d1f
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/panicking.rs:801:13
  14:     0x799f24a6b827 - std::panicking::begin_panic_handler::{{closure}}::h60e075871035f1b2
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/panicking.rs:667:13
  15:     0x799f24a68fa9 - std::sys_common::backtrace::__rust_end_short_backtrace::h2d7ea7abc5510281
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x799f24a6b4d4 - rust_begin_unwind
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/panicking.rs:658:5
  17:     0x799f24ab5d33 - core::panicking::panic_fmt::h5c2727eb7e98b498
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/core/src/panicking.rs:74:14
  18:     0x799f24ab5b8b - core::panicking::panic_display::h94a8eb28f58fd986
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/core/src/panicking.rs:264:5
  19:     0x799f24ab5b8b - core::option::expect_failed::h96edad4082807c8e
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/core/src/option.rs:2021:5
  20:     0x799f22baa2ef - <rustc_expand[54dc30a574a50031]::expand::MacroExpander>::collect_invocations
  21:     0x799f1eff7e4d - <rustc_expand[54dc30a574a50031]::expand::MacroExpander>::fully_expand_fragment
  22:     0x799f23382de0 - <rustc_expand[54dc30a574a50031]::expand::MacroExpander>::expand_crate
  23:     0x799f22b7eef4 - rustc_interface[31624f1d80ab4fc4]::passes::resolver_for_lowering_raw
  24:     0x799f22b7e4af - rustc_query_impl[84344bc95dc11429]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[84344bc95dc11429]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[6499c3638713b479]::query::erase::Erased<[u8; 16usize]>>
  25:     0x799f22b7e49d - <rustc_query_impl[84344bc95dc11429]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[19fe13b6211de354]::ops::function::FnOnce<(rustc_middle[6499c3638713b479]::ty::context::TyCtxt, ())>>::call_once
  26:     0x799f23691940 - rustc_query_system[3ac0490446cce27]::query::plumbing::try_execute_query::<rustc_query_impl[84344bc95dc11429]::DynamicConfig<rustc_query_system[3ac0490446cce27]::query::caches::SingleCache<rustc_middle[6499c3638713b479]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[84344bc95dc11429]::plumbing::QueryCtxt, true>
  27:     0x799f236913ca - rustc_query_impl[84344bc95dc11429]::query_impl::resolver_for_lowering_raw::get_query_incr::__rust_end_short_backtrace
  28:     0x799f23287ac2 - rustc_interface[31624f1d80ab4fc4]::interface::run_compiler::<core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>, rustc_driver_impl[5ac992c1e906279b]::run_compiler::{closure#0}>::{closure#1}
  29:     0x799f232a6749 - std[dcc9197a679e7515]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[31624f1d80ab4fc4]::util::run_in_thread_with_globals<rustc_interface[31624f1d80ab4fc4]::util::run_in_thread_pool_with_globals<rustc_interface[31624f1d80ab4fc4]::interface::run_compiler<core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>, rustc_driver_impl[5ac992c1e906279b]::run_compiler::{closure#0}>::{closure#1}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>::{closure#0}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>
  30:     0x799f232a64fa - <<std[dcc9197a679e7515]::thread::Builder>::spawn_unchecked_<rustc_interface[31624f1d80ab4fc4]::util::run_in_thread_with_globals<rustc_interface[31624f1d80ab4fc4]::util::run_in_thread_pool_with_globals<rustc_interface[31624f1d80ab4fc4]::interface::run_compiler<core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>, rustc_driver_impl[5ac992c1e906279b]::run_compiler::{closure#0}>::{closure#1}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>::{closure#0}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[19fe13b6211de354]::result::Result<(), rustc_span[acf1ed94241100d5]::ErrorGuaranteed>>::{closure#2} as core[19fe13b6211de354]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x799f24a75a7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h63d7e4867a6f7a50
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/alloc/src/boxed.rs:2062:9
  32:     0x799f24a75a7b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc69a2b2417343e31
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/alloc/src/boxed.rs:2062:9
  33:     0x799f24a75a7b - std::sys::pal::unix::thread::Thread::new::thread_start::h3b699498c0d63166
                               at /rustc/8217b412a235407243f2516ebc859e7b3af8345a/library/std/src/sys/pal/unix/thread.rs:108:17
  34:     0x799f1dea6ded - <unknown>
  35:     0x799f1df2a0dc - <unknown>
  36:                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: please attach the file at `/tmp/im/2/rustc-ice-2024-06-15T10_44_28-2450574.txt` to your bug report

note: compiler flags: -C incremental=[REDACTED]

query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
error: aborting due to 1 previous error

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. labels Jun 15, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 15, 2024
@matthiaskrgr
Copy link
Member Author

bisects to #125918 cc @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Jun 15, 2024

That's a revert, the issue probably exists much longer

@matthiaskrgr
Copy link
Member Author

ah 👍
when I start the bisection at a later point, this goes down to
Regression in nightly-2023-11-29

  commit[0] 2023-11-27: Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviper
  commit[1] 2023-11-28: Auto merge of #118395 - compiler-errors:rollup-c8yqlmw, r=compiler-errors
  commit[2] 2023-11-28: Auto merge of #118282 - fee1-dead-contrib:enforce-more, r=compiler-errors
  commit[3] 2023-11-28: Auto merge of #118405 - matthiaskrgr:rollup-3a2eevc, r=matthiaskrgr
  commit[4] 2023-11-28: Auto merge of #110353 - the8472:in-place-flatten-chunks, r=cuviper
  commit[5] 2023-11-28: Auto merge of #118188 - petrochenkov:defeed, r=cjgillot

probably #118282 ?

@oli-obk
Copy link
Contributor

oli-obk commented Jun 15, 2024

Jup, that looks like it

@oli-obk oli-obk added F-effects `#![feature(effects)]` and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 15, 2024
@bors bors closed this as completed in 2fa148e Jun 20, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 20, 2024
Rollup merge of rust-lang#126735 - bvanjoi:fix-126647, r=petrochenkov

collect attrs in const block expr

Fixes rust-lang#126516
Fixes rust-lang#126647

It was forgotten to collect these attributes in the const block expression.

r? `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. F-effects `#![feature(effects)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants