Closed
Description
Code
use foo::*;
mod foo {
pub mod bar {
pub mod bar {
pub mod bar {}
}
}
}
use bar::bar;
use bar::*;
Meta
rustc --version --verbose
:
rustc 1.70.0-nightly (22f247c6f 2023-03-13)
binary: rustc
commit-hash: 22f247c6f3ed388cb702d01c2ff27da658a8b353
commit-date: 2023-03-13
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7
Error output
<output>
Backtrace
thread 'rustc' panicked at 'compiler/rustc_resolve/src/imports.rs:704:25: inconsistent resolution for an import', /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/compiler/rustc_middle/src/util/bug.rs:36:26
stack backtrace:
0: 0x7f57eb2c259a - std::backtrace_rs::backtrace::libunwind::trace::h595f06c70adcc478
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f57eb2c259a - std::backtrace_rs::backtrace::trace_unsynchronized::h177a0149c76cdde9
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f57eb2c259a - std::sys_common::backtrace::_print_fmt::hc0701fd2c3530c58
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:65:5
3: 0x7f57eb2c259a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd4cd115d8750fd6c
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f57eb32439e - core::fmt::write::h93e2f5923c7eca08
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/fmt/mod.rs:1213:17
5: 0x7f57eb2b2be5 - std::io::Write::write_fmt::h8162dbb45f0b9e62
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/io/mod.rs:1682:15
6: 0x7f57eb2c2365 - std::sys_common::backtrace::_print::h1835ef8a8f9066da
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:47:5
7: 0x7f57eb2c2365 - std::sys_common::backtrace::print::hcb5e6388b9235f41
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys_common/backtrace.rs:34:9
8: 0x7f57eb2c512f - std::panicking::default_hook::{{closure}}::h9c084969ccf9a722
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:267:22
9: 0x7f57eb2c4e6b - std::panicking::default_hook::h68fa2ba3c3c6c12f
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:286:9
10: 0x7f57ea0b56e4 - <rustc_driver[f4ad927b3c57833d]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[d16e85342ea223d9]::ops::function::FnOnce<(&core[d16e85342ea223d9]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
11: 0x7f57eb2c596a - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h4e6ced11e07d8b24
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/alloc/src/boxed.rs:2002:9
12: 0x7f57eb2c596a - std::panicking::rust_panic_with_hook::h8d5c434518ef298c
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:692:13
13: 0x7f57eaaf07f2 - std[3da461b304582a2c]::panicking::begin_panic::<alloc[5b05b59796bdfb5c]::string::String>::{closure#0}
14: 0x7f57eaaf032a - std[3da461b304582a2c]::sys_common::backtrace::__rust_end_short_backtrace::<std[3da461b304582a2c]::panicking::begin_panic<alloc[5b05b59796bdfb5c]::string::String>::{closure#0}, !>
15: 0x7f57eaab8351 - std[3da461b304582a2c]::panicking::begin_panic::<alloc[5b05b59796bdfb5c]::string::String>
16: 0x7f57eaa9f85d - rustc_middle[eb7209f5870e9fb7]::util::bug::opt_span_bug_fmt::<rustc_span[4bb3e3ecb57f95d5]::span_encoding::Span>::{closure#0}
17: 0x7f57eaa9f8da - rustc_middle[eb7209f5870e9fb7]::ty::context::tls::with_opt::<rustc_middle[eb7209f5870e9fb7]::util::bug::opt_span_bug_fmt<rustc_span[4bb3e3ecb57f95d5]::span_encoding::Span>::{closure#0}, !>::{closure#0}
18: 0x7f57eaa9f0c6 - rustc_middle[eb7209f5870e9fb7]::ty::context::tls::with_context_opt::<rustc_middle[eb7209f5870e9fb7]::ty::context::tls::with_opt<rustc_middle[eb7209f5870e9fb7]::util::bug::opt_span_bug_fmt<rustc_span[4bb3e3ecb57f95d5]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
19: 0x7f57eaa9f086 - rustc_middle[eb7209f5870e9fb7]::util::bug::opt_span_bug_fmt::<rustc_span[4bb3e3ecb57f95d5]::span_encoding::Span>
20: 0x7f57eaa9f044 - rustc_middle[eb7209f5870e9fb7]::util::bug::span_bug_fmt::<rustc_span[4bb3e3ecb57f95d5]::span_encoding::Span>
21: 0x7f57e92fbd37 - <rustc_resolve[b9ffdbb06ddc059e]::imports::ImportResolver>::finalize_import
22: 0x7f57e92f9bfd - <rustc_resolve[b9ffdbb06ddc059e]::imports::ImportResolver>::finalize_imports
23: 0x7f57e92a2132 - <rustc_session[b580c712976fc965]::session::Session>::time::<(), <rustc_resolve[b9ffdbb06ddc059e]::Resolver>::resolve_crate::{closure#0}>
24: 0x7f57e92a05b1 - rustc_interface[3781616314f5d936]::passes::configure_and_expand
25: 0x7f57e929fac6 - <rustc_interface[3781616314f5d936]::queries::Queries>::expansion
26: 0x7f57e929a719 - <rustc_interface[3781616314f5d936]::queries::Queries>::global_ctxt
27: 0x7f57e929320d - rustc_span[4bb3e3ecb57f95d5]::with_source_map::<core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>, rustc_interface[3781616314f5d936]::interface::run_compiler<core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>, rustc_driver[f4ad927b3c57833d]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
28: 0x7f57e928bce4 - <scoped_tls[1a6b834cb64348ef]::ScopedKey<rustc_span[4bb3e3ecb57f95d5]::SessionGlobals>>::set::<rustc_interface[3781616314f5d936]::interface::run_compiler<core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>, rustc_driver[f4ad927b3c57833d]::run_compiler::{closure#1}>::{closure#0}, core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>>
29: 0x7f57e928b3e2 - std[3da461b304582a2c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3781616314f5d936]::util::run_in_thread_pool_with_globals<rustc_interface[3781616314f5d936]::interface::run_compiler<core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>, rustc_driver[f4ad927b3c57833d]::run_compiler::{closure#1}>::{closure#0}, core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>>
30: 0x7f57e928b18a - <<std[3da461b304582a2c]::thread::Builder>::spawn_unchecked_<rustc_interface[3781616314f5d936]::util::run_in_thread_pool_with_globals<rustc_interface[3781616314f5d936]::interface::run_compiler<core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>, rustc_driver[f4ad927b3c57833d]::run_compiler::{closure#1}>::{closure#0}, core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d16e85342ea223d9]::result::Result<(), rustc_errors[41d09747e2f98dea]::ErrorGuaranteed>>::{closure#1} as core[d16e85342ea223d9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
31: 0x7f57eb2cf823 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1c0f3664d7ced314
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/alloc/src/boxed.rs:1988:9
32: 0x7f57eb2cf823 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h67647c21c6c4968a
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/alloc/src/boxed.rs:1988:9
33: 0x7f57eb2cf823 - std::sys::unix::thread::Thread::new::thread_start::h355d348ba593a22c
at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/sys/unix/thread.rs:108:17
34: 0x7f57e6c67bb5 - <unknown>
35: 0x7f57e6ce9d90 - <unknown>
36: 0x0 - <unknown>
error: internal compiler error: unexpected panic
note: 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.68.0 (2c8cc3432 2023-03-06) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack