Skip to content

thread 'rustc' panicked at 'called Option::unwrap() on a None value' #89209

Closed as not planned
@schneiderfelipe

Description

@schneiderfelipe

Unfortunately, I don't have a code example to share, but here's the output:

Error output

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value',
compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:18:85

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (308dffd25 2021-09-22)
binary: rustc
commit-hash: 308dffd25cb55bbb4a1fbee9822cf82c6a5d012d
commit-date: 2021-09-22
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:18:85
stack backtrace:
   0: rust_begin_unwind
             at /rustc/308dffd25cb55bbb4a1fbee9822cf82c6a5d012d/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/308dffd25cb55bbb4a1fbee9822cf82c6a5d012d/library/core/src/panicking.rs:103:14
   2: core::panicking::panic
             at /rustc/308dffd25cb55bbb4a1fbee9822cf82c6a5d012d/library/core/src/panicking.rs:50:5
   3: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::def_path_hash_to_def_id
   4: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
   5: 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::DefId>::recover
   6: rustc_query_system::query::plumbing::force_query
   7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   8: rustc_query_system::query::plumbing::ensure_must_run
   9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::check_mod_liveness
  10: rustc_middle::hir::map::Map::for_each_module
  11: rustc_session::utils::<impl rustc_session::session::Session>::time
  12: rustc_interface::passes::analysis
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  14: rustc_data_structures::stack::ensure_sufficient_stack
  15: rustc_query_system::query::plumbing::try_execute_query
  16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  17: rustc_interface::passes::QueryContext::enter
  18: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  19: rustc_span::with_source_map
  20: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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-nightly (308dffd25 2021-09-22) running on x86_64-unknown-linux-gnu

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-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