Skip to content

[ICE]: resolve: no entry found for key #163294

Closed

Description

@matthiaskrgr

Code

pub use core as _;
fn main() {}

Meta

regression in #161349 which just merged

Error output

error[E0432]: unresolved import `core`
 --> code.rs:1:9
  |
1 | pub use core as _;
  |         ----^^^^^
  |         |
  |         no `core` in the root

Backtrace

thread 'rustc' (704861) panicked at /rustc-dev/0d38a842626a6e3b70e2c1efd76a8f22d2556d73/compiler/rustc_resolve/src/check_unused.rs:139:56:
no entry found for key
stack backtrace:
   0:     0x7f9b6be064b6 - <<std[43fa4487f7071c1]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[42ab620d884d63b4]::fmt::Display>::fmt
   1:     0x7f9b6c40931f - core[42ab620d884d63b4]::fmt::write
   2:     0x7f9b6be1b48c - <std[43fa4487f7071c1]::sys::stdio::unix::Stderr as core[42ab620d884d63b4]::io::write::Write>::write_fmt
   3:     0x7f9b6bdd8dba - std[43fa4487f7071c1]::panicking::default_hook::{closure#0}
   4:     0x7f9b6bdfa8c3 - std[43fa4487f7071c1]::panicking::default_hook
   5:     0x7f9b6ab5f566 - std[43fa4487f7071c1]::panicking::update_hook::<alloc[8b147ceb10aa39e]::boxed::Box<rustc_driver_impl[67dcdd6613a160fa]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f9b6bdfad62 - std[43fa4487f7071c1]::panicking::panic_with_hook
   7:     0x7f9b6bdd8e72 - std[43fa4487f7071c1]::panicking::panic_handler::{closure#0}
   8:     0x7f9b6bdd1c89 - std[43fa4487f7071c1]::sys::backtrace::__rust_end_short_backtrace::<std[43fa4487f7071c1]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f9b6bddaa4d - __rustc[9bc508cd62a36b41]::rust_begin_unwind
  10:     0x7f9b689dbdec - core[42ab620d884d63b4]::panicking::panic_fmt
  11:     0x7f9b697c2f44 - core[42ab620d884d63b4]::option::expect_failed
  12:     0x7f9b6e1b0723 - <rustc_resolve[abf34fc8e9b843ae]::check_unused::UnusedImportCheckVisitor>::check_import_as_underscore.cold
  13:     0x7f9b6c9be715 - <rustc_resolve[abf34fc8e9b843ae]::check_unused::UnusedImportCheckVisitor>::check_use_tree
  14:     0x7f9b6c9be3c4 - <rustc_resolve[abf34fc8e9b843ae]::check_unused::UnusedImportCheckVisitor as rustc_ast[6431ffa01bcb9ba9]::visit::Visitor>::visit_item
  15:     0x7f9b6c9c321f - <rustc_resolve[abf34fc8e9b843ae]::Resolver>::resolve_crate::{closure#0}
  16:     0x7f9b6c9bd68f - <rustc_resolve[abf34fc8e9b843ae]::Resolver>::resolve_crate
  17:     0x7f9b6cad6a31 - rustc_interface[841c7ab3b81f99c3]::passes::resolver_for_lowering_raw
  18:     0x7f9b6cad5bf0 - rustc_query_impl[b49a6ef11f90f1ce]::query_vtables::resolver_for_lowering_raw::invoke_provider_fn::__rust_begin_short_backtrace
  19:     0x7f9b6d6a2c73 - rustc_query_impl[b49a6ef11f90f1ce]::execution::try_execute_query::<rustc_middle[202246c450a9466c]::query::caches::SingleCache<rustc_middle[202246c450a9466c]::query::erase::ErasedData<[u8; 24usize]>>, false>
  20:     0x7f9b6d6a2a26 - rustc_query_impl[b49a6ef11f90f1ce]::query_vtables::resolver_for_lowering_raw::execute_query_non_incr::__rust_end_short_backtrace
  21:     0x7f9b6d69ef6c - rustc_interface[841c7ab3b81f99c3]::interface::run_compiler::<(), rustc_driver_impl[67dcdd6613a160fa]::run_compiler::{closure#0}>::{closure#2}
  22:     0x7f9b6d72a2a4 - std[43fa4487f7071c1]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[841c7ab3b81f99c3]::util::run_in_thread_with_globals<rustc_interface[841c7ab3b81f99c3]::util::run_in_thread_pool_with_globals<rustc_interface[841c7ab3b81f99c3]::interface::run_compiler<(), rustc_driver_impl[67dcdd6613a160fa]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  23:     0x7f9b6d72a04b - <std[43fa4487f7071c1]::thread::lifecycle::spawn_unchecked<rustc_interface[841c7ab3b81f99c3]::util::run_in_thread_with_globals<rustc_interface[841c7ab3b81f99c3]::util::run_in_thread_pool_with_globals<rustc_interface[841c7ab3b81f99c3]::interface::run_compiler<(), rustc_driver_impl[67dcdd6613a160fa]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[42ab620d884d63b4]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7f9b6d72de9b - <std[43fa4487f7071c1]::sys::thread::unix::Thread>::new::thread_start
  25:     0x7f9b666980a2 - <unknown>
  26:     0x7f9b6672080c - <unknown>
  27:                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 `/home/matthias/vcs/github/CRED/rustc-ice-2026-09-25T01_37_22-704859.txt` to your bug report

note: rustc 1.100.0-nightly (0d38a8426 2026-09-24) running on x86_64-unknown-linux-gnu

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

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

Activity

  1. added
    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.
    C-bugCategory: This is a bug.
    on Sep 25, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 25, 2026
  3. added
    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
    on Sep 25, 2026
  4. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Sep 25, 2026
  5. self-assigned this
    on Sep 25, 2026
  6. added a commit that references this issue on Sep 25, 2026
  7. added a commit that references this issue on Sep 25, 2026
  8. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Sep 25, 2026
  9. added a commit that references this issue on Sep 25, 2026
  10. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions