Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
brettman opened this issue Jan 16, 2022 · 2 comments
Closed

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

brettman opened this issue Jan 16, 2022 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@brettman
Copy link

Going through the blockchain tutorial here:
https://www.youtube.com/playlist?list=PLwnSaD6BDfXL0RiKT_5nOIdxTxZWpPtAv

Haven't had any issues for a couple days off an on just plowing through the tutorial videos. Suddenly the complier starts panicking. Not sure what's causing the error but you can the code is here:
https://github.com/brettman/blockchain-rust

As far as I can tell it's pretty much exactly what they have in the tutorial repo which builds fine still for me.


RUST_BACKTRACE=1 cargo build
Compiling blockchain-rust v0.1.0 (/Users/-----/Documents/devrust/blockchain-rust)
thread 'rustc' panicked at 'called Option::unwrap() on a None value', /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
4: 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
5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
6: rustc_query_system::dep_graph::graph::DepGraph::try_mark_previous_green
7: rustc_query_system::dep_graph::graph::DepGraph::try_mark_previous_green
8: rustc_query_system::dep_graph::graph::DepGraph::try_mark_previous_green
9: rustc_query_system::dep_graph::graph::DepGraph::try_mark_previous_green
10: rustc_query_system::dep_graph::graph::DepGraph::try_mark_green
11: rustc_query_system::query::plumbing::ensure_must_run
12: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::coherent_trait
13: rustc_session::session::Session::track_errors
14: rustc_typeck::check_crate
15: rustc_interface::passes::analysis
16: rustc_query_system::dep_graph::graph::DepGraph::with_task
17: rustc_data_structures::stack::ensure_sufficient_stack
18: rustc_query_system::query::plumbing::try_execute_query
19: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
20: rustc_interface::passes::QueryContext::enter
21: rustc_interface::queries::::enter
22: rustc_span::with_source_map
23: scoped_tls::ScopedKey::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 (f1edd04 2021-11-29) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -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
error: could not compile blockchain-rust

@brettman brettman added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 16, 2022
@Aaron1011
Copy link
Member

This should be fixed in the latest nightly

@Aaron1011
Copy link
Member

See #91924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants