Skip to content

[ICE]: assertion failed in try_plant_decl_into_local_module during glob import resolution #152595

@0xAlcibiades

Description

@0xAlcibiades

Code

Compiling polars-core v0.53.0 from crates.io as a transitive dependency. No custom code required to trigger — the ICE occurs during macro expansion / import resolution in the upstream crate.

Meta

rustc --version --verbose:

rustc 1.94.0-beta.3 (2e10913d4 2026-02-12)
binary: rustc
commit-hash: 2e10913d41804c24699d33fbef20933d993525cf
commit-date: 2026-02-12
host: aarch64-unknown-linux-gnu
release: 1.94.0-beta.3
LLVM version: 20.1.1

Error output

thread 'rustc' (6780) panicked at /rustc-dev/2e10913d41804c24699d33fbef20933d993525cf/compiler/rustc_resolve/src/imports.rs:382:13:
assertion failed: !deep_decl.is_glob_import()

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.94.0-beta.3 (2e10913d4 2026-02-12) running on aarch64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C opt-level=2 -C embed-bitcode=no -C debug-assertions=on -C strip=debuginfo

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

error: could not compile `polars-core` (lib)
Backtrace

   0:     0xffff9e04fd3c - std::backtrace_rs::backtrace::libunwind::trace::h90da6d400ed28357
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
   1:     0xffff9e04fd3c - std::backtrace_rs::backtrace::trace_unsynchronized::hd6b075637b4984e1
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
   2:     0xffff9e04fd3c - std::sys::backtrace::_print_fmt::hb00b72ca7b573e48
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/sys/backtrace.rs:74:9
   3:     0xffff9e04fd3c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h283e5e855680d6f3
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/sys/backtrace.rs:44:26
   4:     0xffff9affb98c - core::fmt::rt::Argument::fmt::he8bd18616c027b33
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/core/src/fmt/rt.rs:152:76
   5:     0xffff9affb98c - core::fmt::write::h928a7631cfa055bf
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/core/src/fmt/mod.rs:1686:22
   6:     0xffff9e00b03c - std::io::default_write_fmt::h09575a3954d029b6
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/io/mod.rs:639:11
   7:     0xffff9e00b03c - std::io::Write::write_fmt::hcca855f0b55ae642
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/io/mod.rs:1994:13
   8:     0xffff9e022860 - std::sys::backtrace::BacktraceLock::print::hed330c6485f1e039
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/sys/backtrace.rs:47:9
   9:     0xffff9e022860 - std::panicking::default_hook::{{closure}}::hbd98f9b72ce014dc
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/panicking.rs:292:27
  10:     0xffff9e02271c - std::panicking::default_hook::h6ba1590855e0e025
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/panicking.rs:319:9
  11:     0xffff9d1ae4f0 - std[273e34c8e1d1ce6]::panicking::update_hook::<alloc[fa6cb5e69164d997]::boxed::Box<rustc_driver_impl[1f0180266c04bf39]::install_ice_hook::{closure#1}>>::{closure#0}
  12:     0xffff9e022be8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he984fb2554a88032
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/alloc/src/boxed.rs:2220:9
  13:     0xffff9e022be8 - std::panicking::panic_with_hook::hf5fd30fdd905aa27
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/panicking.rs:833:13
  14:     0xffff9e022938 - std::panicking::panic_handler::{{closure}}::h57c5fb3a2e05d449
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/panicking.rs:691:13
  15:     0xffff9e01cc50 - std::sys::backtrace::__rust_begin_short_backtrace::h1b7579adef36686a
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/sys/backtrace.rs:182:18
  16:     0xffff9e000854 - __rustc[fd400b3984e34f88]::rust_begin_unwind
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/panicking.rs:689:5
  17:     0xffff9b750b64 - core::panicking::panic_fmt::hfc637df6474ed6d5
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/core/src/panicking.rs:80:14
  18:     0xffff9b073614 - core::panicking::panic::h5e02a8a119570577
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/core/src/panicking.rs:150:5
  19:     0xffff9b425aa4 - <rustc_resolve[c16377d6fd8e5cb9]::Resolver>::try_plant_decl_into_local_module
  20:     0xffff9b423f44 - <rustc_resolve[c16377d6fd8e5cb9]::Resolver>::try_plant_decl_into_local_module
  21:     0xffff9b422530 - <rustc_resolve[c16377d6fd8e5cb9]::Resolver as rustc_expand[6680b40575f326fb]::base::ResolverExpand>::resolve_imports
  22:     0xffff9af0ebec - <rustc_expand[6680b40575f326fb]::expand::MacroExpander>::fully_expand_fragment
  23:     0xffff9bf45528 - <rustc_expand[6680b40575f326fb]::expand::MacroExpander>::expand_crate
  24:     0xffff9bf48724 - rustc_interface[a500720fdcca900d]::passes::configure_and_expand
  25:     0xffff9be3a418 - rustc_interface[a500720fdcca900d]::passes::resolver_for_lowering_raw
  26:     0xffff9c785770 - rustc_query_impl[c627d7da569e2f93]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c627d7da569e2f93]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[828438ec0f24ab54]::query::erase::Erased<[u8; 16usize]>>
  27:     0xffff9c785144 - rustc_query_system[5b72f78afea28c47]::query::plumbing::try_execute_query::<rustc_query_impl[c627d7da569e2f93]::DynamicConfig<rustc_query_system[5b72f78afea28c47]::query::caches::SingleCache<rustc_middle[828438ec0f24ab54]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[c627d7da569e2f93]::plumbing::QueryCtxt, false>
  28:     0xffff9c784e8c - rustc_query_impl[c627d7da569e2f93]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
  29:     0xffff9c5ff090 - <rustc_interface[a500720fdcca900d]::passes::create_and_enter_global_ctxt<core[6bc8a995821dff8e]::option::Option<rustc_interface[a500720fdcca900d]::queries::Linker>, rustc_driver_impl[1f0180266c04bf39]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[6bc8a995821dff8e]::ops::function::FnOnce<(&rustc_session[ca786f7c8e3e50a5]::session::Session, rustc_middle[828438ec0f24ab54]::ty::context::CurrentGcx, alloc[fa6cb5e69164d997]::sync::Arc<rustc_data_structures[78ba6f43548750b]::jobserver::Proxy>, &std[273e34c8e1d1ce6]::sync::once_lock::OnceLock<rustc_middle[828438ec0f24ab54]::ty::context::GlobalCtxt>, &rustc_data_structures[78ba6f43548750b]::sync::worker_local::WorkerLocal<rustc_middle[828438ec0f24ab54]::arena::Arena>, &rustc_data_structures[78ba6f43548750b]::sync::worker_local::WorkerLocal<rustc_hir[38db3605cc4da13f]::Arena>, rustc_driver_impl[1f0180266c04bf39]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  30:     0xffff9c5eb130 - rustc_interface[a500720fdcca900d]::interface::run_compiler::<(), rustc_driver_impl[1f0180266c04bf39]::run_compiler::{closure#0}>::{closure#1}
  31:     0xffff9c4de990 - std[273e34c8e1d1ce6]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[a500720fdcca900d]::util::run_in_thread_with_globals<rustc_interface[a500720fdcca900d]::util::run_in_thread_pool_with_globals<rustc_interface[a500720fdcca900d]::interface::run_compiler<(), rustc_driver_impl[1f0180266c04bf39]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  32:     0xffff9c4de720 - <std[273e34c8e1d1ce6]::thread::lifecycle::spawn_unchecked<rustc_interface[a500720fdcca900d]::util::run_in_thread_with_globals<rustc_interface[a500720fdcca900d]::util::run_in_thread_pool_with_globals<rustc_interface[a500720fdcca900d]::interface::run_compiler<(), rustc_driver_impl[1f0180266c04bf39]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[6bc8a995821dff8e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  33:     0xffff9e019544 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc1085fc381233aea
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/alloc/src/boxed.rs:2206:9
  34:     0xffff9e019544 - std::sys::thread::unix::Thread::new::thread_start::hfb6aad6a311e5b2f
                               at /rustc/2e10913d41804c24699d33fbef20933d993525cf/library/std/src/sys/thread/unix.rs:127:17
  35:     0xffff99b8595c - <unknown>
  36:     0xffff99bebb4c - <unknown>
  37:                0x0 - <unknown>

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-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