Skip to content

ICE: resolve: unreachable!() #117920

Closed
@matthiaskrgr

Description

@matthiaskrgr

code:

use super::Hasher;

/// [`Hasher`]
pub use core::hash::*;

Version information

rustc 1.76.0-nightly (8d57ad1ad 2023-11-14)
binary: rustc
commit-hash: 8d57ad1adeb66bc183ee8171b57839656896b7d5
commit-date: 2023-11-14
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.4

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --crate-type=lib --edition=2021

Program output

error[E0433]: failed to resolve: there are too many leading `super` keywords
 --> /tmp/icemaker_global_tempdir.4VMqOGqkjbwX/rustc_testrunner_tmpdir_reporting.FyxGL0BoHose/mvce.rs:1:5
  |
1 | use super::Hasher;
  |     ^^^^^ there are too many leading `super` keywords

thread 'rustc' panicked at compiler/rustc_resolve/src/lib.rs:2006:67:
internal error: entered unreachable code
stack backtrace:
   0:     0x7f029878b89c - std::backtrace_rs::backtrace::libunwind::trace::h31c51c172b60df1f
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f029878b89c - std::backtrace_rs::backtrace::trace_unsynchronized::he3f7436095f6c268
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f029878b89c - std::sys_common::backtrace::_print_fmt::h9ecb16af589a0fbb
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f029878b89c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h879345ff56d51582
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f02987de8a0 - core::fmt::rt::Argument::fmt::hf48167ed22d6afa3
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/core/src/fmt/rt.rs:142:9
   5:     0x7f02987de8a0 - core::fmt::write::haf17f643ce868e2d
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f029877f7bf - std::io::Write::write_fmt::hea57ebf7fed914ac
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/io/mod.rs:1762:15
   7:     0x7f029878b684 - std::sys_common::backtrace::_print::hd6cb4ba72955bb4b
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f029878b684 - std::sys_common::backtrace::print::h4634a5d49ae4175c
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f029878e317 - std::panicking::default_hook::{{closure}}::h5b815abc8880c45c
  10:     0x7f029878e07f - std::panicking::default_hook::h9fc3db6ef2ff0764
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/panicking.rs:292:9
  11:     0x7f029b4e6c00 - std[4c4ee8ebf0986186]::panicking::update_hook::<alloc[b75c4bd6c90be06c]::boxed::Box<rustc_driver_impl[f2304ccc53dc8b38]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f029878ea58 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h0b9450117303d0ca
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/alloc/src/boxed.rs:2021:9
  13:     0x7f029878ea58 - std::panicking::rust_panic_with_hook::h628d6ded0472c14b
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/panicking.rs:783:13
  14:     0x7f029878e779 - std::panicking::begin_panic_handler::{{closure}}::h66949746e4f54942
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/panicking.rs:649:13
  15:     0x7f029878bd66 - std::sys_common::backtrace::__rust_end_short_backtrace::h44ec451ae0e12e00
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7f029878e512 - rust_begin_unwind
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/panicking.rs:645:5
  17:     0x7f02987daf85 - core::panicking::panic_fmt::h5b80d414fa976bfc
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/core/src/panicking.rs:72:14
  18:     0x7f02987db023 - core::panicking::panic::h284eac24c512f90b
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/core/src/panicking.rs:127:5
  19:     0x7f029d092d10 - <rustc_resolve[6a65679376ac23a9]::late::LateResolutionVisitor>::resolve_and_cache_rustdoc_path
  20:     0x7f029d0911cf - <rustc_resolve[6a65679376ac23a9]::late::LateResolutionVisitor>::resolve_doc_links
  21:     0x7f029d39422a - <rustc_resolve[6a65679376ac23a9]::late::LateResolutionVisitor as rustc_ast[e37068419772bcd3]::visit::Visitor>::visit_item
  22:     0x7f029d76c294 - <rustc_resolve[6a65679376ac23a9]::Resolver>::resolve_crate::{closure#0}
  23:     0x7f029d769394 - <rustc_resolve[6a65679376ac23a9]::Resolver>::resolve_crate
  24:     0x7f029d841c23 - rustc_interface[ed36f66d4dd25afa]::passes::resolver_for_lowering
  25:     0x7f029d840bab - rustc_query_impl[c23592c0c653c664]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c23592c0c653c664]::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle[69724fdf0a9160]::query::erase::Erased<[u8; 8usize]>>
  26:     0x7f029d4ffbb2 - rustc_query_system[d7212ac5995c6075]::query::plumbing::try_execute_query::<rustc_query_impl[c23592c0c653c664]::DynamicConfig<rustc_query_system[d7212ac5995c6075]::query::caches::SingleCache<rustc_middle[69724fdf0a9160]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[c23592c0c653c664]::plumbing::QueryCtxt, false>
  27:     0x7f029d500609 - rustc_query_impl[c23592c0c653c664]::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
  28:     0x7f029d79e127 - rustc_interface[ed36f66d4dd25afa]::interface::run_compiler::<core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>, rustc_driver_impl[f2304ccc53dc8b38]::run_compiler::{closure#1}>::{closure#0}
  29:     0x7f029d7a5619 - std[4c4ee8ebf0986186]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[ed36f66d4dd25afa]::util::run_in_thread_with_globals<rustc_interface[ed36f66d4dd25afa]::util::run_in_thread_pool_with_globals<rustc_interface[ed36f66d4dd25afa]::interface::run_compiler<core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>, rustc_driver_impl[f2304ccc53dc8b38]::run_compiler::{closure#1}>::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>
  30:     0x7f029d7a5443 - <<std[4c4ee8ebf0986186]::thread::Builder>::spawn_unchecked_<rustc_interface[ed36f66d4dd25afa]::util::run_in_thread_with_globals<rustc_interface[ed36f66d4dd25afa]::util::run_in_thread_pool_with_globals<rustc_interface[ed36f66d4dd25afa]::interface::run_compiler<core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>, rustc_driver_impl[f2304ccc53dc8b38]::run_compiler::{closure#1}>::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[41362f4be93c713f]::result::Result<(), rustc_span[e48a8ae9d6fa383d]::ErrorGuaranteed>>::{closure#1} as core[41362f4be93c713f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7f0298798915 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9a9c2927adaa2592
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/alloc/src/boxed.rs:2007:9
  32:     0x7f0298798915 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3d4b40c6e2a97503
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/alloc/src/boxed.rs:2007:9
  33:     0x7f0298798915 - std::sys::unix::thread::Thread::new::thread_start::hab0d4f9d960c1874
                               at /rustc/8d57ad1adeb66bc183ee8171b57839656896b7d5/library/std/src/sys/unix/thread.rs:108:17
  34:     0x7f02985549eb - <unknown>
  35:     0x7f02985d87cc - <unknown>
  36:                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: rustc 1.76.0-nightly (8d57ad1ad 2023-11-14) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -Z dump-mir-dir=dir

query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: aborting due to previous error

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-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.T-rustdocRelevant to the rustdoc 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