ICE:assertion failed: import.imported_module.get().is_none()
#125013
Description
opened on May 11, 2024
This crashes with every edition except 2015 🤔
snippet:
use io::{self as std};
use std::ops::Deref::{self as io};
Version information
rustc 1.80.0-nightly (35c5e67c6 2024-05-11)
binary: rustc
commit-hash: 35c5e67c69cbde49b47fe537e296803b6a25b456
commit-date: 2024-05-11
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.4
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zunstable-options --edition=2024
Program output
thread 'rustc' panicked at compiler/rustc_resolve/src/imports.rs:926:21:
assertion failed: import.imported_module.get().is_none()
stack backtrace:
0: 0x7d29815dfc45 - std::backtrace_rs::backtrace::libunwind::trace::hba6094fc6b596e2e
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x7d29815dfc45 - std::backtrace_rs::backtrace::trace_unsynchronized::h3b202ba307e40438
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7d29815dfc45 - std::sys_common::backtrace::_print_fmt::h86408adb99a13f5c
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7d29815dfc45 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbd6f80f0e5997f54
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7d298162ee0b - core::fmt::rt::Argument::fmt::hc498e90c1989f8fc
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/core/src/fmt/rt.rs:165:63
5: 0x7d298162ee0b - core::fmt::write::ha011919bce0aa4f2
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/core/src/fmt/mod.rs:1157:21
6: 0x7d29815d4a0f - std::io::Write::write_fmt::hc5d7335558d7c2f5
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/io/mod.rs:1835:15
7: 0x7d29815dfa1e - std::sys_common::backtrace::_print::hb5e8494623fbcf06
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7d29815dfa1e - std::sys_common::backtrace::print::h944fe8485fd95854
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7d29815e2389 - std::panicking::default_hook::{{closure}}::hd7a32cc14f6b3aad
10: 0x7d29815e20cd - std::panicking::default_hook::hce26d1b7cfeb1dbb
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/panicking.rs:298:9
11: 0x7d297ded14af - std[51ea32a909324831]::panicking::update_hook::<alloc[77c3f3c3161b06c0]::boxed::Box<rustc_driver_impl[aad4619bae6cbfbd]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7d29815e2a86 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3bc218da95aac6f0
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/alloc/src/boxed.rs:2036:9
13: 0x7d29815e2a86 - std::panicking::rust_panic_with_hook::h104a5f4852f71fae
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/panicking.rs:799:13
14: 0x7d29815e27fb - std::panicking::begin_panic_handler::{{closure}}::hbe2cffd5894aac21
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/panicking.rs:656:13
15: 0x7d29815e0109 - std::sys_common::backtrace::__rust_end_short_backtrace::h124d376bffe44b06
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys_common/backtrace.rs:171:18
16: 0x7d29815e2567 - rust_begin_unwind
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/panicking.rs:652:5
17: 0x7d298162b3d3 - core::panicking::panic_fmt::ha6a495494fa26de2
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/core/src/panicking.rs:72:14
18: 0x7d298162b47c - core::panicking::panic::h43564003bddcc9c0
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/core/src/panicking.rs:146:5
19: 0x7d2980257274 - <rustc_resolve[287ffcdb65d0abd4]::Resolver>::resolve_crate::{closure#0}
20: 0x7d2980248ac0 - <rustc_resolve[287ffcdb65d0abd4]::Resolver>::resolve_crate
21: 0x7d297f7be7c1 - rustc_interface[1af8fbac95f387b0]::passes::resolver_for_lowering_raw
22: 0x7d297f7bda0d - rustc_query_impl[b785da3d31912d7f]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[b785da3d31912d7f]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1afb1a57a12263fe]::query::erase::Erased<[u8; 16usize]>>
23: 0x7d297f7bd9ef - <rustc_query_impl[b785da3d31912d7f]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[7b5ea08294f46cd8]::ops::function::FnOnce<(rustc_middle[1afb1a57a12263fe]::ty::context::TyCtxt, ())>>::call_once
24: 0x7d297ffa34c5 - rustc_query_system[42f095e9d6ad5ed8]::query::plumbing::try_execute_query::<rustc_query_impl[b785da3d31912d7f]::DynamicConfig<rustc_query_system[42f095e9d6ad5ed8]::query::caches::SingleCache<rustc_middle[1afb1a57a12263fe]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[b785da3d31912d7f]::plumbing::QueryCtxt, false>
25: 0x7d297ffa3059 - rustc_query_impl[b785da3d31912d7f]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
26: 0x7d297fe3bffe - rustc_interface[1af8fbac95f387b0]::interface::run_compiler::<core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>, rustc_driver_impl[aad4619bae6cbfbd]::run_compiler::{closure#0}>::{closure#1}
27: 0x7d297fe27d09 - std[51ea32a909324831]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1af8fbac95f387b0]::util::run_in_thread_with_globals<rustc_interface[1af8fbac95f387b0]::util::run_in_thread_pool_with_globals<rustc_interface[1af8fbac95f387b0]::interface::run_compiler<core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>, rustc_driver_impl[aad4619bae6cbfbd]::run_compiler::{closure#0}>::{closure#1}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>::{closure#0}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>
28: 0x7d297fe27ab6 - <<std[51ea32a909324831]::thread::Builder>::spawn_unchecked_<rustc_interface[1af8fbac95f387b0]::util::run_in_thread_with_globals<rustc_interface[1af8fbac95f387b0]::util::run_in_thread_pool_with_globals<rustc_interface[1af8fbac95f387b0]::interface::run_compiler<core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>, rustc_driver_impl[aad4619bae6cbfbd]::run_compiler::{closure#0}>::{closure#1}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>::{closure#0}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7b5ea08294f46cd8]::result::Result<(), rustc_span[f63607c00cb4b4d8]::ErrorGuaranteed>>::{closure#2} as core[7b5ea08294f46cd8]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
29: 0x7d29815ec8cb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h47404fef54470e82
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/alloc/src/boxed.rs:2022:9
30: 0x7d29815ec8cb - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h94736f8ab20acaae
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/alloc/src/boxed.rs:2022:9
31: 0x7d29815ec8cb - std::sys::pal::unix::thread::Thread::new::thread_start::h3dd6ac2255354521
at /rustc/35c5e67c69cbde49b47fe537e296803b6a25b456/library/std/src/sys/pal/unix/thread.rs:108:17
32: 0x7d298138b55a - <unknown>
33: 0x7d2981408a3c - <unknown>
34: 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: rustc 1.80.0-nightly (35c5e67c6 2024-05-11) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z unstable-options -Z dump-mir-dir=dir
query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
Metadata
Assignees
Labels
Area: Name/path resolution done by `rustc_resolve` specificallyCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Status: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.
Activity