Skip to content

Unexpected panic in rustc_hir/src/definitions.rs #93020

Closed
@esoterra

Description

@esoterra

Code

I cannot achieve reproduction except in the exact repo on the exact machine I ran this.
Creating another clone of the same project checked out to the same branch does not reproduce even on the same machine.

The branch in question is:
https://github.com/wrought-lang/wrought-rs/tree/rename_operation

Meta

rustc --version --verbose:

rustc 1.57.0 (f1edd0429 2021-11-29)
binary: rustc
commit-hash: f1edd0429582dd29cccacaf50fd134b05593bd9c
commit-date: 2021-11-29
host: x86_64-pc-windows-msvc
release: 1.57.0
LLVM version: 13.0.0

Error output

WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\proc_macro_error_attr-c6a371d29b9d37ab.dll
   Compiling wrought v0.1.2 (C:\Users\Kyle B\git\wrought)
WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\clap_derive-62021203e3222423.dll
WARN rustc_metadata::locator no metadata found: failed to decompress metadata: \\?\C:\Users\Kyle B\git\wrought\target\debug\deps\logos_derive-155681c1c4f1014b.dll
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_hir\src\definitions.rs:452:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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.57.0 (f1edd0429 2021-11-29) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `wrought`
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\compiler\rustc_hir\src\definitions.rs:452:14
stack backtrace:
   0:     0x7ff8045292cf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   1:     0x7ff80455306a - core::fmt::write::he97f21b785b90134
   2:     0x7ff80451b448 - <std::io::IoSlice as core::fmt::Debug>::fmt::h967100caef347f28
   3:     0x7ff80452cd96 - std::panicking::take_hook::hb46205f0055becfd
   4:     0x7ff80452c797 - std::panicking::take_hook::hb46205f0055becfd
   5:     0x7ffff885a295 - <tracing_subscriber::fmt::writer::TestWriter as std::io::Write>::flush::hff7a705da113f4ca
   6:     0x7ff80452d6a9 - std::panicking::rust_panic_with_hook::hce0846b912adb5c5
   7:     0x7ff80452d11f - rust_begin_unwind
   8:     0x7ff804529bf7 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h53606b08c01ef688
   9:     0x7ff80452d0a9 - rust_begin_unwind
  10:     0x7ff804589510 - core::panicking::panic_fmt::h58715deff5969a45
  11:     0x7ff80458945c - core::panicking::panic::hc36befec1b90302c
  12:     0x7ffffc0db97e - <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id::h9f7b03ae96e81f81
  13:     0x7ffffcdeeeb4 - rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover::he3ec8272ca40aa05
  14:     0x7ffffc001dad - rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node::h913d78c1ee69fb04
  15:     0x7ffffc05cb34 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  16:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  17:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  18:     0x7ffffc05cb0b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  19:     0x7ffffc03497d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  20:     0x7ffffbd1b45e - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  21:     0x7ffffc023283 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  22:     0x7ffffb253b93 - <rustc_typeck::check::PlaceOp as core::fmt::Debug>::fmt::h2e3c14b4c6653d68
  23:     0x7ffffb20daf3 - rustc_typeck::check_crate::h07f2a7631cf584be
  24:     0x7ffff89c3e8d - rustc_interface::passes::analysis::hc0b219c9fceabc88
  25:     0x7ffffbfdb8eb - ZN16rustc_query_impl13on_disk_cache260_$LT$impl$u20$rustc_serialize..serialize..Decodable$LT$rustc_query_impl..on_disk_cache..CacheDecoder$GT$$u20$for$u20$$RF$std..collections..hash..set..HashSet$LT$rustc_span..def_id..LocalDefId$C$core..hash..BuildHasher
  26:     0x7ffffc06c61d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  27:     0x7ffffbfb2972 - <rustc_span::def_id::LocalDefId as rustc_query_impl::profiling_support::SpecIntoSelfProfilingString>::spec_to_self_profile_string::h641e5a6d4a18de66
  28:     0x7ffffbd54849 - <rustc_mir_dataflow::framework::cursor::CursorPosition as core::fmt::Debug>::fmt::hdad43e681eb5eae7
  29:     0x7ffffc01e095 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h79c2867594abd9a1
  30:     0x7ffff88ae59a - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  31:     0x7ffff8878944 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  32:     0x7ffff88b07e6 - <tracing_subscriber::util::TryInitError as core::fmt::Display>::fmt::h8e44660347c50da5
  33:     0x7ffff887ed63 - rustc_driver::pretty::print_after_hir_lowering::h16ae7f3f7d316762
  34:     0x7ffff88d9a58 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h11014d06e9af86ea
  35:     0x7ff804539d8c - std::sys::windows::thread::Thread::new::h4046847bccf80b57
  36:     0x7ff8638a7034 - BaseThreadInitThunk
  37:     0x7ff865022651 - RtlUserThreadStart

error: internal compiler error: unexpected panic

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions