Skip to content

ICE !d1.warn_ambiguity.get() #150977

@matthiaskrgr

Description

@matthiaskrgr

Code

//  compile-flags: --edition=2021
mod framing {
    mod public_message_in {
        mod public_message {
            mod public_message {
                pub struct ConfirmedTranscriptHashInput;
            }
            mod public_message_in {
                use super::*;
                #[derive(Debug)]
                pub struct ConfirmedTranscriptHashInput;
            }
            pub use public_message::*;
            use public_message_in::*;
        }
        mod public_message_in {
            #[derive(Debug)]
            pub struct ConfirmedTranscriptHashInput;
        }
        pub use public_message::*;
        use public_message_in::*;
    }
    use public_message_in::*;
}

Meta

rustc --version --verbose:

rustc 1.94.0-nightly (1279939b3 2026-01-11)
binary: rustc
commit-hash: 1279939b38db460bd3844a6ca44e94961a48333d
commit-date: 2026-01-11
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8

Error output

<output>
Backtrace

thread 'rustc' (1127871) panicked at /rustc-dev/f57eac1bf98cb5d578e3364b64365ec398c137df/compiler/rustc_resolve/src/imports.rs:306:9:
assertion failed: !d1.warn_ambiguity.get()
stack backtrace:
   0:     0x7f5b4b2404f3 - <<std[14974c2a6d31bd09]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[75fca27d79ab979d]::fmt::Display>::fmt
   1:     0x7f5b4b80fac8 - core[75fca27d79ab979d]::fmt::write
   2:     0x7f5b4b256776 - <std[14974c2a6d31bd09]::sys::stdio::unix::Stderr as std[14974c2a6d31bd09]::io::Write>::write_fmt
   3:     0x7f5b4b2160e8 - std[14974c2a6d31bd09]::panicking::default_hook::{closure#0}
   4:     0x7f5b4b233d83 - std[14974c2a6d31bd09]::panicking::default_hook
   5:     0x7f5b4a215eaa - std[14974c2a6d31bd09]::panicking::update_hook::<alloc[97bcaa3c9f42b50c]::boxed::Box<rustc_driver_impl[8626402415690959]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f5b4b234062 - std[14974c2a6d31bd09]::panicking::panic_with_hook
   7:     0x7f5b4b2161da - std[14974c2a6d31bd09]::panicking::panic_handler::{closure#0}
   8:     0x7f5b4b20a659 - std[14974c2a6d31bd09]::sys::backtrace::__rust_end_short_backtrace::<std[14974c2a6d31bd09]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f5b4b217c7d - __rustc[92b3c909df398c49]::rust_begin_unwind
  10:     0x7f5b4864b37c - core[75fca27d79ab979d]::panicking::panic_fmt
  11:     0x7f5b47aa7732 - core[75fca27d79ab979d]::panicking::panic
  12:     0x7f5b4b83a9a1 - <rustc_resolve[41811edf1107842c]::Resolver>::try_plant_decl_into_local_module
  13:     0x7f5b4b839a8c - <rustc_resolve[41811edf1107842c]::Resolver>::try_plant_decl_into_local_module
  14:     0x7f5b4b839a8c - <rustc_resolve[41811edf1107842c]::Resolver>::try_plant_decl_into_local_module
  15:     0x7f5b4bef3a3a - <rustc_resolve[41811edf1107842c]::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast[fb79bc709f34828d]::visit::Visitor>::visit_item
  16:     0x7f5b4beff9f5 - <rustc_resolve[41811edf1107842c]::Resolver as rustc_expand[74b331e941252b0a]::base::ResolverExpand>::visit_ast_fragment_with_placeholders
  17:     0x7f5b4ce5393d - <rustc_expand[74b331e941252b0a]::expand::MacroExpander>::fully_expand_fragment
  18:     0x7f5b4ce3eb52 - <rustc_expand[74b331e941252b0a]::expand::MacroExpander>::expand_crate
  19:     0x7f5b4be5b434 - rustc_interface[90afb413dadbe4f1]::passes::configure_and_expand
  20:     0x7f5b4c982598 - rustc_interface[90afb413dadbe4f1]::passes::resolver_for_lowering_raw
  21:     0x7f5b4c98230d - rustc_query_impl[7762d22649c04fd8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7762d22649c04fd8]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[42069f076602ef26]::query::erase::Erased<[u8; 16usize]>>
  22:     0x7f5b4c9822ef - <rustc_query_impl[7762d22649c04fd8]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[75fca27d79ab979d]::ops::function::FnOnce<(rustc_middle[42069f076602ef26]::ty::context::TyCtxt, ())>>::call_once
  23:     0x7f5b4c95c15f - rustc_query_system[4067c90f9d31d9ad]::query::plumbing::try_execute_query::<rustc_query_impl[7762d22649c04fd8]::DynamicConfig<rustc_query_system[4067c90f9d31d9ad]::query::caches::SingleCache<rustc_middle[42069f076602ef26]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[7762d22649c04fd8]::plumbing::QueryCtxt, false>
  24:     0x7f5b4c95bcbc - rustc_query_impl[7762d22649c04fd8]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7f5b4cb2467b - <rustc_interface[90afb413dadbe4f1]::passes::create_and_enter_global_ctxt<core[75fca27d79ab979d]::option::Option<rustc_interface[90afb413dadbe4f1]::queries::Linker>, rustc_driver_impl[8626402415690959]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[75fca27d79ab979d]::ops::function::FnOnce<(&rustc_session[7c34b462142e1273]::session::Session, rustc_middle[42069f076602ef26]::ty::context::CurrentGcx, alloc[97bcaa3c9f42b50c]::sync::Arc<rustc_data_structures[5b2e5bcce01f3ea3]::jobserver::Proxy>, &std[14974c2a6d31bd09]::sync::once_lock::OnceLock<rustc_middle[42069f076602ef26]::ty::context::GlobalCtxt>, &rustc_data_structures[5b2e5bcce01f3ea3]::sync::worker_local::WorkerLocal<rustc_middle[42069f076602ef26]::arena::Arena>, &rustc_data_structures[5b2e5bcce01f3ea3]::sync::worker_local::WorkerLocal<rustc_hir[a6c28dd0effa383c]::Arena>, rustc_driver_impl[8626402415690959]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  26:     0x7f5b4ca1cf98 - rustc_interface[90afb413dadbe4f1]::interface::run_compiler::<(), rustc_driver_impl[8626402415690959]::run_compiler::{closure#0}>::{closure#1}
  27:     0x7f5b4c865f4e - std[14974c2a6d31bd09]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[90afb413dadbe4f1]::util::run_in_thread_with_globals<rustc_interface[90afb413dadbe4f1]::util::run_in_thread_pool_with_globals<rustc_interface[90afb413dadbe4f1]::interface::run_compiler<(), rustc_driver_impl[8626402415690959]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  28:     0x7f5b4c865d20 - <std[14974c2a6d31bd09]::thread::lifecycle::spawn_unchecked<rustc_interface[90afb413dadbe4f1]::util::run_in_thread_with_globals<rustc_interface[90afb413dadbe4f1]::util::run_in_thread_pool_with_globals<rustc_interface[90afb413dadbe4f1]::interface::run_compiler<(), rustc_driver_impl[8626402415690959]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[75fca27d79ab979d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  29:     0x7f5b4c868438 - <std[14974c2a6d31bd09]::sys::thread::unix::Thread>::new::thread_start
  30:     0x7f5b4629698b - <unknown>
  31:     0x7f5b4631a9cc - <unknown>
  32:                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-01-11T19_16_38-1127853.txt` to your bug report

note: rustc 1.94.0-nightly (f57eac1bf 2026-01-10) 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

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) ❄️P-highHigh priorityT-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