Skip to content

ICE : no entry found for key #123912

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

Closed
Naserume opened this issue Apr 14, 2024 · 1 comment · Fixed by #124318
Closed

ICE : no entry found for key #123912

Naserume opened this issue Apr 14, 2024 · 1 comment · Fixed by #124318
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Naserume
Copy link

Code

macro_rules! m {
    ($attr_path: path) => {
        #[$attr_path]
        fn f() {}
    }
}

m!(inline<{
    let a = CharCharFloat { a: 1 };
    println!("a: {}", a);
}>); 

fn main() {}

Command: rustc ./B141D41129789031369EB5D3F9AB04D118366B0C8AC480C3BED360DCE9E06177_1.rs -Cincremental=<dir>

Meta

rustc --version --verbose:

rustc 1.79.0-nightly (a07f3eb43 2024-04-11)
binary: rustc
commit-hash: a07f3eb43acc5df851e15176c7081a900a30a4d7
commit-date: 2024-04-11
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.3

Error output

error: unexpected generic arguments in path
  --> ./B141D41129789031369EB5D3F9AB04D118366B0C8AC480C3BED360DCE9E06177_1.rs:8:10
   |
8  |   m!(inline<{
   |  __________^
9  | |     let a = CharCharFloat { a: 1 };
10 | |     let b = rustrt::rust_dbg_abi_4(a);
11 | |     println!("a: {}", b.a);
12 | | }>); 
   | |__^
Backtrace

thread 'rustc' panicked at compiler/rustc_resolve/src/macros.rs:177:32:
no entry found for key
stack backtrace:
   0:        0x108c954c7 - std::backtrace::Backtrace::create::h4743fb21546249db
   1:        0x108c95415 - std::backtrace::Backtrace::force_capture::hb8b1d29966a44460
   2:        0x111915632 - std[f58925984e4ba660]::panicking::update_hook::<alloc[7ccd2460fcc84bcc]::boxed::Box<rustc_driver_impl[a1251635572e46a7]::install_ice_hook::{closure#0}>>::{closure#0}
   3:        0x108caf5ac - std::panicking::rust_panic_with_hook::h61a41fa7242ab39f
   4:        0x108caeee4 - std::panicking::begin_panic_handler::{{closure}}::h89a92112f6b111fc
   5:        0x108cac479 - std::sys_common::backtrace::__rust_end_short_backtrace::h7bbc20b04078efff
   6:        0x108caec16 - _rust_begin_unwind
   7:        0x108d14205 - core::panicking::panic_fmt::h7a4e70edc377250f
   8:        0x108cf44ab - core::panicking::panic_display::h4c7aca4a3393808e
   9:        0x108d141cc - core::option::expect_failed::h35d971f63c4c0185
  10:        0x112f0f768 - <rustc_resolve[41813434bf436dcc]::Resolver as rustc_expand[a02015e63b8a7d49]::base::ResolverExpand>::invocation_parent
  11:        0x111a6f0b7 - <rustc_expand[a02015e63b8a7d49]::expand::MacroExpander>::collect_invocations
  12:        0x111a6dbe0 - <rustc_expand[a02015e63b8a7d49]::expand::MacroExpander>::fully_expand_fragment
  13:        0x111a6d051 - <rustc_expand[a02015e63b8a7d49]::expand::MacroExpander>::expand_crate
  14:        0x1120cb24c - rustc_interface[af2ca0a56f94541a]::passes::resolver_for_lowering_raw
  15:        0x112d65c72 - rustc_query_impl[f5eefc6947ef7e80]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f5eefc6947ef7e80]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e9e7e9212601f969]::query::erase::Erased<[u8; 16usize]>>
  16:        0x112d2c5de - <rustc_query_impl[f5eefc6947ef7e80]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[f40075c897a8f469]::ops::function::FnOnce<(rustc_middle[e9e7e9212601f969]::ty::context::TyCtxt, ())>>::call_once
  17:        0x112b48ba9 - rustc_query_system[fe55c7fabe9a3c42]::query::plumbing::try_execute_query::<rustc_query_impl[f5eefc6947ef7e80]::DynamicConfig<rustc_query_system[fe55c7fabe9a3c42]::query::caches::SingleCache<rustc_middle[e9e7e9212601f969]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[f5eefc6947ef7e80]::plumbing::QueryCtxt, true>
  18:        0x112d6cca2 - rustc_query_impl[f5eefc6947ef7e80]::query_impl::resolver_for_lowering_raw::get_query_incr::__rust_end_short_backtrace
  19:        0x1118c284e - <rustc_interface[af2ca0a56f94541a]::queries::QueryResult<&rustc_middle[e9e7e9212601f969]::ty::context::GlobalCtxt>>::enter::<&rustc_data_structures[1643199f196fd526]::steal::Steal<(rustc_middle[e9e7e9212601f969]::ty::ResolverAstLowering, alloc[7ccd2460fcc84bcc]::sync::Arc<rustc_ast[6dafcb48f8b51f45]::ast::Crate>)>, rustc_driver_impl[a1251635572e46a7]::run_compiler::{closure#0}::{closure#1}::{closure#2}>
  20:        0x111912d93 - rustc_interface[af2ca0a56f94541a]::interface::run_compiler::<core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>, rustc_driver_impl[a1251635572e46a7]::run_compiler::{closure#0}>::{closure#0}
  21:        0x11190aded - std[f58925984e4ba660]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[af2ca0a56f94541a]::util::run_in_thread_with_globals<rustc_interface[af2ca0a56f94541a]::util::run_in_thread_pool_with_globals<rustc_interface[af2ca0a56f94541a]::interface::run_compiler<core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>, rustc_driver_impl[a1251635572e46a7]::run_compiler::{closure#0}>::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>
  22:        0x11191d3e6 - <<std[f58925984e4ba660]::thread::Builder>::spawn_unchecked_<rustc_interface[af2ca0a56f94541a]::util::run_in_thread_with_globals<rustc_interface[af2ca0a56f94541a]::util::run_in_thread_pool_with_globals<rustc_interface[af2ca0a56f94541a]::interface::run_compiler<core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>, rustc_driver_impl[a1251635572e46a7]::run_compiler::{closure#0}>::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f40075c897a8f469]::result::Result<(), rustc_span[c82961d20e3179b8]::ErrorGuaranteed>>::{closure#2} as core[f40075c897a8f469]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:        0x108cb8ceb - std::sys::pal::unix::thread::Thread::new::thread_start::hdf1b3a8a8ee01738
  24:     0x7ff818270202 - __pthread_start


rustc version: 1.79.0-nightly (0bf471f33 2024-04-13)
platform: x86_64-apple-darwin

query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack

@Naserume Naserume added C-bug Category: This is a bug. 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. labels Apr 14, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 14, 2024
@jieyouxu jieyouxu added A-resolve Area: Name/path resolution done by `rustc_resolve` specifically S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 15, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 18, 2024
@cushionbadak
Copy link

cushionbadak commented Apr 23, 2024

cargo bisect-rustc points to nightly-2021-09-02

bisected with cargo-bisect-rustc v0.6.8

cargo bisect-rustc --start 2023-01-01 --end 2024-04-12 --preserve --regress ice

checking the start range to find a passing nightly
installing nightly-2021-01-01
rust-std-nightly-x86_64-unknown-linux-gnu: 24.48 MB / 24.48 MB [=======] 100.00 % 4.43 MB/s testing...
RESULT: nightly-2021-01-01, ===> No

checking the end range to verify it does not pass
installing nightly-2024-04-12
testing...
RESULT: nightly-2024-04-12, ===> Yes

599 versions remaining to test after this (roughly 10 steps)
installing nightly-2022-08-22
rust-std-nightly-x86_64-unknown-linux-gnu: 30.27 MB / 30.27 MB [=======] 100.00 % 4.00 MB/s testing...
RESULT: nightly-2022-08-22, ===> Yes

299 versions remaining to test after this (roughly 9 steps)
installing nightly-2021-10-27
rust-std-nightly-x86_64-unknown-linux-gnu: 24.97 MB / 24.97 MB [=======] 100.00 % 1.90 MB/s testing...
RESULT: nightly-2021-10-27, ===> Yes

150 versions remaining to test after this (roughly 8 steps)
installing nightly-2021-05-30
rust-std-nightly-x86_64-unknown-linux-gnu: 21.94 MB / 21.94 MB [=======] 100.00 % 3.90 MB/s testing...
RESULT: nightly-2021-05-30, ===> No

75 versions remaining to test after this (roughly 7 steps)
installing nightly-2021-08-13
rust-std-nightly-x86_64-unknown-linux-gnu: 22.34 MB / 22.34 MB [=======] 100.00 % 3.86 MB/s testing...
RESULT: nightly-2021-08-13, ===> No

38 versions remaining to test after this (roughly 6 steps)
installing nightly-2021-09-19
rust-std-nightly-x86_64-unknown-linux-gnu: 24.76 MB / 24.76 MB [=======] 100.00 % 4.00 MB/s testing...
RESULT: nightly-2021-09-19, ===> Yes

19 versions remaining to test after this (roughly 5 steps)
installing nightly-2021-08-31
rust-std-nightly-x86_64-unknown-linux-gnu: 23.47 MB / 23.47 MB [=======] 100.00 % 4.15 MB/s testing...
RESULT: nightly-2021-08-31, ===> No

10 versions remaining to test after this (roughly 4 steps)
installing nightly-2021-09-09
rust-std-nightly-x86_64-unknown-linux-gnu: 23.46 MB / 23.46 MB [=======] 100.00 % 4.30 MB/s testing...
RESULT: nightly-2021-09-09, ===> Yes

5 versions remaining to test after this (roughly 3 steps)
installing nightly-2021-09-04
rust-std-nightly-x86_64-unknown-linux-gnu: 23.47 MB / 23.47 MB [====] 100.00 % 4.07 MB/s 0s testing...
RESULT: nightly-2021-09-04, ===> Yes

2 versions remaining to test after this (roughly 2 steps)
installing nightly-2021-09-02
rust-std-nightly-x86_64-unknown-linux-gnu: 23.45 MB / 23.45 MB [=======] 100.00 % 3.98 MB/s testing...
RESULT: nightly-2021-09-02, ===> Yes

1 versions remaining to test after this (roughly 1 steps)
installing nightly-2021-09-01
rust-std-nightly-x86_64-unknown-linux-gnu: 23.45 MB / 23.45 MB [=======] 100.00 % 4.05 MB/s testing...
RESULT: nightly-2021-09-01, ===> No

searched toolchains nightly-2021-01-01 through nightly-2024-04-12


********************************************************************************
Regression in nightly-2021-09-02
********************************************************************************

fetching https://static.rust-lang.org/dist/2021-09-01/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2021-09-01: 40 B / 40 B [===========================] 100.00 % 777.61 KB/s converted 2021-09-01 to 29ef6cf1637aa8317f8911f93f14e18d404c1b0e
fetching https://static.rust-lang.org/dist/2021-09-02/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2021-09-02: 40 B / 40 B [===========================] 100.00 % 699.11 KB/s converted 2021-09-02 to 50171c310cd15e1b2d3723766ce64e2e4d6696fc
looking for regression commit between 2021-09-01 and 2021-09-02
hfetching (via remote github) commits from max(29ef6cf1637aa8317f8911f93f14e18d404c1b0e, 2021-08-30) to 50171c310cd15e1b2d3723766ce64e2e4d6696fc
ending github query because we found starting sha: 29ef6cf1637aa8317f8911f93f14e18d404c1b0e
get_commits_between returning commits, len: 9
  commit[0] 2021-08-31: Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehuss
  commit[1] 2021-08-31: Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino
  commit[2] 2021-09-01: Auto merge of #87688 - camsteffen:let-else, r=cjgillot
  commit[3] 2021-09-01: Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank
  commit[4] 2021-09-01: Auto merge of #88272 - willcrichton:mutable-sparse-matrix, r=ecstatic-morse
  commit[5] 2021-09-01: Auto merge of #88556 - m-ou-se:rollup-q636wyd, r=m-ou-se
  commit[6] 2021-09-01: Auto merge of #88395 - ricky26:llvm-submodule, r=nikic
  commit[7] 2021-09-01: Auto merge of #88269 - prconrad:doctest-persist-binaries, r=jyn514
  commit[8] 2021-09-01: Auto merge of #88563 - ehuss:update-cargo-books, r=ehuss
ERROR: no CI builds available between 29ef6cf1637aa8317f8911f93f14e18d404c1b0e and 50171c310cd15e1b2d3723766ce64e2e4d6696fc within last 167 days

@bors bors closed this as completed in 69122f1 May 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 11, 2024
Rollup merge of rust-lang#124318 - bvanjoi:fix-123911, r=petrochenkov

ignore generics args in attribute paths

Fixes rust-lang#97006
Fixes rust-lang#123911
Fixes rust-lang#123912

This patch ensures that we no longer have to handle invalid generic arguments in attribute paths.

r? `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name/path resolution done by `rustc_resolve` specifically C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue 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.

5 participants