Closed
Description
Code
The code that broke is here.
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-unknown-linux-gnu
release: 1.57.0
LLVM version: 13.0.0
Error output
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-unknown-linux-gnu
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 [unsafety_check_result] unsafety-checking `game::Player::O::{constant#0}`
#1 [analysis] running analysis passes on this crate
end of query stack
Backtrace
thread 'rustc' panicked at 'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/check_unsafety.rs:445:36
stack backtrace:
0: rust_begin_unwind
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
2: rustc_mir_transform::check_unsafety::unsafety_check_result
3: core::ops::function::FnOnce::call_once
4: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
5: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory
6: rustc_query_system::query::plumbing::try_execute_query
7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::unsafety_check_result
8: rustc_mir_transform::check_unsafety::check_unsafety
9: rustc_session::utils::<impl rustc_session::session::Session>::time
10: rustc_interface::passes::analysis
11: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
12: rustc_data_structures::stack::ensure_sufficient_stack
13: rustc_query_system::query::plumbing::try_execute_query
14: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
15: rustc_interface::passes::QueryContext::enter
16: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
17: rustc_span::with_source_map
18: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.