Description
Code
I haven't got a minimal viable repro, since I unfortunately hit this with a pretty big local changeset and can't seem to figure out what tweaks resulted in this. Sorry for the lack of detail - wanted to report sooner rather than later since I may or may not have time to dig deeper soon and wanted to make sure I reported.
That said, I committed right when I noticed this, so the code it's crashing on is (very work-in-progress) here: https://github.com/natasha-codes/locations/tree/0f2dd2f80f736ca44aab5706909efdcba12398d0/server.
I'll try to find a workaround locally, and if I do I'll follow up here to try and get a minimal repro!
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
Got the crash while running cargo check
from the directory linked above, on the commit in that same link.
internal compiler error: unexpected panic
More detail included in the backtrace below.
Backtrace
Checking locations v0.0.1 (/Users/sasha/dev/locations/server)
warning: unused import: `jsonwebtoken::crypto::sign`
--> src/auth/keys.rs:1:5
|
1 | use jsonwebtoken::crypto::sign;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `jsonwebtoken::Validation`
--> src/auth/openid.rs:3:5
|
3 | use jsonwebtoken::Validation;
| ^^^^^^^^^^^^^^^^^^^^^^^^
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/decoder.rs:1565:75
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::lazy::OnceCell<T>::get_or_init
4: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::def_path_hash_to_def_id
5: rustc_middle::ty::query::on_disk_cache::OnDiskCache::def_path_hash_to_def_id
6: rustc_middle::ty::query::force_from_dep_node
7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
8: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_green_and_read
9: rustc_data_structures::stack::ensure_sufficient_stack
10: rustc_query_system::query::plumbing::get_query_impl
11: rustc_middle::ty::print::pretty::PrettyPrinter::try_print_visible_def_path_recur
12: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
13: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_type
14: rustc_middle::ty::print::pretty::<impl core::fmt::Display for &rustc_middle::ty::TyS>::fmt
15: core::fmt::write
16: rustc_infer::infer::error_reporting::<impl rustc_infer::infer::InferCtxt>::cmp
17: rustc_infer::infer::error_reporting::<impl rustc_infer::infer::InferCtxt>::values_str
18: rustc_infer::infer::error_reporting::<impl rustc_infer::infer::InferCtxt>::note_type_err
19: rustc_infer::infer::error_reporting::<impl rustc_infer::infer::InferCtxt>::report_and_explain_type_error
20: rustc_infer::infer::InferCtxt::report_mismatched_types
21: rustc_typeck::check::demand::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::demand_coerce_diag
22: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
23: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_method_argument_types
24: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
25: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
26: rustc_typeck::check::_match::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_match
27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
28: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
29: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
30: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
31: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
32: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
33: rustc_typeck::check::check::check_fn
34: rustc_infer::infer::InferCtxtBuilder::enter
35: rustc_typeck::check::typeck
36: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute
37: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
39: rustc_data_structures::stack::ensure_sufficient_stack
40: rustc_query_system::query::plumbing::get_query_impl
41: rustc_query_system::query::plumbing::ensure_query_impl
42: rustc_typeck::check::typeck_item_bodies
43: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
44: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
45: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
46: rustc_data_structures::stack::ensure_sufficient_stack
47: rustc_query_system::query::plumbing::get_query_impl
48: rustc_typeck::check_crate
49: rustc_interface::passes::analysis
50: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
51: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
52: rustc_query_system::dep_graph::graph::DepGraph<K>::with_eval_always_task
53: rustc_data_structures::stack::ensure_sufficient_stack
54: rustc_query_system::query::plumbing::get_query_impl
55: rustc_interface::passes::QueryContext::enter
56: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
57: rustc_span::with_source_map
58: rustc_interface::interface::create_compiler_and_run
59: 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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-apple-darwin
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 [visible_parent_map] calculating the visible parent map
#1 [typeck] type-checking `auth::keys::KeySet::validate_jwt`
#2 [typeck_item_bodies] type-checking all item bodies
#3 [analysis] running analysis passes on this crate
end of query stack
warning: 2 warnings emitted
error: could not compile `locations`
To learn more, run the command again with --verbose.