Description
Meta
Version:
rustc 1.57.0-nightly (5ecc8ad84 2021-09-19)
Error output
Backtrace
user@computer:~/dleq-rs$ RUST_BACKTRACE=1 cargo test
Compiling dleq v0.0.0 (/home/user/dleq-rs)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
0: rust_begin_unwind
0: rust_begin_unwind
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:103:14
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/std/src/panicking.rs:517:5
2: core::panicking::panic
1: core::panicking::panic_fmt
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:103:14
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:50:5
2: core::panicking::panic
at /rustc/5ecc8ad8462574354a55162a0c16b10eb95e3e70/library/core/src/panicking.rs:50:5
3: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
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
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
5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
6: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
6: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
8: rustc_query_system::query::plumbing::ensure_must_run
8: rustc_query_system::query::plumbing::ensure_must_run
9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::fn_sig
9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::fn_sig
10: <rustc_typeck::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item
10: <rustc_typeck::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item
11: rustc_middle::hir::map::Map::visit_item_likes_in_module
11: rustc_middle::hir::map::Map::visit_item_likes_in_module
12: rustc_typeck::collect::collect_mod_item_types
12: rustc_typeck::collect::collect_mod_item_types
13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
14: rustc_data_structures::stack::ensure_sufficient_stack
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>::collect_mod_item_types
15: rustc_query_system::query::plumbing::try_execute_query
16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_mod_item_types
17: rustc_middle::hir::map::Map::for_each_module
17: rustc_middle::hir::map::Map::for_each_module
18: rustc_session::session::Session::track_errors
18: rustc_session::session::Session::track_errors
19: rustc_typeck::check_crate
20: rustc_interface::passes::analysis
19: rustc_typeck::check_crate
20: rustc_interface::passes::analysis
21: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
21: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
22: rustc_data_structures::stack::ensure_sufficient_stack
22: rustc_data_structures::stack::ensure_sufficient_stack
23: rustc_query_system::query::plumbing::try_execute_query
24: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
25: rustc_interface::passes::QueryContext::enter
23: rustc_query_system::query::plumbing::try_execute_query
24: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
25: rustc_interface::passes::QueryContext::enter
26: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
26: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
27: rustc_span::with_source_map
27: rustc_span::with_source_map
28: scoped_tls::ScopedKey<T>::set
28: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: internal compiler error: unexpected panic
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
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 (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu
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: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental
note: rustc 1.57.0-nightly (5ecc8ad84 2021-09-19) running on x86_64-unknown-linux-gnu
note: some of the compiler flags provided by cargo are hidden
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib
query stack during panic:
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [collect_mod_item_types] collecting item types in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
#0 [collect_mod_item_types] collecting item types in top-level module
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `dleq`
warning: build failed, waiting for other jobs to finish...
error: build failed
user@computer:~/dleq-rs$
Encountered while working on a project of mine. I copied the directory to another location to back it up, and went there to confirm the same command exhibited the same behavior. The changed path triggered a rebuild and this caused rustc to work without issue, leading me to believe there's a malformed cache. I have been updating my Cargo.toml, from additions to removals to even a version upgrade. That said, my only change before my last successful compile and this one was introducing a few errors while I expanded functionality. I was hoping my malformed code would offer a MRE, yet unfortunately (or fortunately) Rust can handle it.
I am on nightly and went to the latest nightly to check this was still an issue. Doing so rebuilt my cache yet again, hence why my version info is what it is (it's rustup's logs on what it upgraded from). I do have a copy of the cache directory, as it caused errors, I'd be willing to send privately if it'd be beneficial. I never directly edited it. As for the code edits, those would be harder to track down due to the fact I'm in the middle of a commit, and can't confirm what my code was on the last successful compile in order to provide such a diff.