Skip to content

ICE : no entry found for key #123912

Closed
@Naserume

Description

@Naserume

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-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