Closed
Description
Code
I am able to reproduce when I use bitflags!
bitflags! {
pub struct DbPutOptions : u16 {
const NONE = 0b0000;
const SKIP_CACHE = 0b0001;
const SKIP_DB = 0b0010;
const IGNORE_CLUSTER_SLOTS = 0b0011;
}
}
Meta
rustc --version --verbose
:
rustc 1.50.0-nightly (1700ca07c 2020-12-08)
binary: rustc
commit-hash: 1700ca07c6dd7becff85678409a5df6ad4cf4f47
commit-date: 2020-12-08
host: x86_64-apple-darwin
release: 1.50.0-nightly
Error output
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/query/mod.rs:235:5
stack backtrace:
0: 0x10352a1fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hddf67b5e68ee5eac
1: 0x10359199d - core::fmt::write::hae6418d3f135b639
2: 0x10351be16 - std::io::Write::write_fmt::h822c37b1fbb805d3
3: 0x10352de79 - std::panicking::default_hook::{{closure}}::hb8c76ec6b2b5fec2
4: 0x10352da00 - std::panicking::default_hook::h9520f36dd50be056
5: 0x105b6bd08 - rustc_driver::report_ice::hab08807b07bece61
6: 0x10352e65e - std::panicking::rust_panic_with_hook::hbb70e1d25c7381a9
7: 0x10352e139 - std::panicking::begin_panic_handler::{{closure}}::hb72eee9aad2e147c
8: 0x10352a6b8 - std::sys_common::backtrace::__rust_end_short_backtrace::h372ff87ecb2667f3
9: 0x10352e0ca - _rust_begin_unwind
10: 0x1035b8c1f - core::panicking::panic_fmt::h261fd45d36f74dfa
11: 0x1035b8b77 - core::panicking::panic::hee3a097dbdc988d8
12: 0x109c385f6 - rustc_middle::ty::query::try_load_from_on_disk_cache::h79b5afe1c2e80cd7
13: 0x1091514d4 - rustc_query_system::dep_graph::graph::DepGraph<K>::exec_cache_promotions::h59848ff5959f2b25
14: 0x1091667e8 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h6b0f4f58f3fe4fa5
15: 0x1091208a3 - rustc_incremental::persist::save::save_in::h95c4af985c810672
16: 0x10911c79f - rustc_data_structures::sync::join::h28cbe6f4856b759a
17: 0x1091661ed - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h417a8e727abe81c6
18: 0x10911f947 - rustc_incremental::persist::save::save_dep_graph::h5168ffbb71fa5484
19: 0x10903cad3 - rustc_codegen_ssa::base::finalize_tcx::h27af4387e3fad8ad
20: 0x105f1cb60 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h672987f7a5956f16
21: 0x105d2e64d - rustc_session::utils::<impl rustc_session::session::Session>::time::hdde8570199d8b0d3
22: 0x105d66182 - rustc_interface::passes::QueryContext::enter::hd55f5917ee1869a7
23: 0x105dabf30 - rustc_interface::queries::Queries::ongoing_codegen::hd9e56cbce1d99cdb
24: 0x105b1e49f - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hb3cbdf40d2d583ab
25: 0x105b9bc7e - rustc_span::with_source_map::h4f73b4651f1d8670
26: 0x105b1f414 - rustc_interface::interface::create_compiler_and_run::ha35d2af54e9355e8
27: 0x105bb1fe9 - scoped_tls::ScopedKey<T>::set::h8cb1fe74bd062a4c
28: 0x105bb8431 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8e2469a9116ebf76
29: 0x105b26af9 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hfc39034b1b021f49
30: 0x10353afdd - std::sys::unix::thread::Thread::new::thread_start::h93dd3097fa4fa219
31: 0x7fff6f470109 - __pthread_start
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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-apple-darwin
note: compiler flags: -C embed-bitcode=no -C codegen-units=256 -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
Backtrace
<backtrace>