Repository: rust
Issue: thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:22:85
Labels: I-ICE,T-compiler,A-incr-comp,C-bug,S-needs-repro

### Meta
```
rustc 1.75.0 (82e1608df 2023-12-21) running on x86_64-apple-darwin
```

### Error output

```
thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:22:85:
called `Option::unwrap()` on a `None` value
```

<details><summary><strong>Backtrace</strong></summary>
<p>

```
stack backtrace:
   0:        0x10e2cd40b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h958f6e6821e9b0fb
   1:        0x10e319b43 - core::fmt::write::hb5e3c29742bab55e
   2:        0x10e2c379e - std::io::Write::write_fmt::h3f38404afa442946
   3:        0x10e2cd1e9 - std::sys_common::backtrace::print::h1ce04ba6121a0174
   4:        0x10e2d03b5 - std::panicking::default_hook::{{closure}}::hf2e5fe71523bcace
   5:        0x10e2d0134 - std::panicking::default_hook::h4f8cdc98d2dcc8c0
   6:        0x11981125e - <alloc[fff0538d66581e96]::boxed::Box<rustc_driver_impl[5b49da1f7667149]::install_ice_hook::{closure#0}> as core[7d2d2f04a0a3cf2a]::ops::function::Fn<(&dyn for<'a, 'b> core[7d2d2f04a0a3cf2a]::ops::function::Fn<(&'a core[7d2d2f04a0a3cf2a]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[7d2d2f04a0a3cf2a]::marker::Send + core[7d2d2f04a0a3cf2a]::marker::Sync, &core[7d2d2f04a0a3cf2a]::panic::panic_info::PanicInfo)>>::call
   7:        0x10e2d0a55 - std::panicking::rust_panic_with_hook::h28420d44f043d3a5
   8:        0x10e2d07bc - std::panicking::begin_panic_handler::{{closure}}::h6f886c0e89185cdc
   9:        0x10e2cd8e9 - std::sys_common::backtrace::__rust_end_short_backtrace::h7ca2b2ff22d46410
  10:        0x10e2d0542 - _rust_begin_unwind
  11:        0x10e335bd5 - core::panicking::panic_fmt::h52dad7a658d9bf41
  12:        0x10e335c67 - core::panicking::panic::ha1c871ecc7d4b1cb
  13:        0x11a1a9b08 - <rustc_metadata[6583a092e9181587]::creader::CStore as rustc_session[ee1f78cfd1cd5629]::cstore::CrateStore>::def_path_hash_to_def_id
  14:        0x11a38b509 - <rustc_middle[44406bf613825fc6]::ty::context::TyCtxt>::def_path_hash_to_def_id
  15:        0x11ac1b871 - <rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::query_callback<rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::type_of::QueryType>::{closure#0} as core[7d2d2f04a0a3cf2a]::ops::function::FnOnce<(rustc_middle[44406bf613825fc6]::ty::context::TyCtxt, rustc_query_system[d58496f053c0d289]::dep_graph::dep_node::DepNode)>>::call_once
  16:        0x11ac83f22 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  17:        0x11ac83f84 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  18:        0x11ac83f84 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  19:        0x11ac83ca6 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  20:        0x11ab918ce - rustc_query_system[d58496f053c0d289]::query::plumbing::try_execute_query::<rustc_query_impl[f8a79d08ba0ddcf9]::DynamicConfig<rustc_query_system[d58496f053c0d289]::query::caches::DefaultCache<rustc_type_ir[193dd4a4d77624f6]::canonical::Canonical<rustc_middle[44406bf613825fc6]::ty::context::TyCtxt, rustc_middle[44406bf613825fc6]::ty::ParamEnvAnd<rustc_middle[44406bf613825fc6]::ty::Predicate>>, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt, true>
  21:        0x11acf61e2 - rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  22:        0x11b33e176 - <rustc_infer[dada4788a1f4a6f3]::infer::InferCtxt as rustc_trait_selection[f2d930dd2783eb35]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  23:        0x11b33e45f - <rustc_infer[dada4788a1f4a6f3]::infer::InferCtxt as rustc_trait_selection[f2d930dd2783eb35]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  24:        0x11b2a8605 - <rustc_trait_selection[f2d930dd2783eb35]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  25:        0x11b2a72a3 - <rustc_trait_selection[f2d930dd2783eb35]::traits::fulfill::FulfillProcessor as rustc_data_structures[a81f2c46e525c8b2]::obligation_forest::ObligationProcessor>::process_obligation
  26:        0x11b15cc33 - <rustc_data_structures[a81f2c46e525c8b2]::obligation_forest::ObligationForest<rustc_trait_selection[f2d930dd2783eb35]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[f2d930dd2783eb35]::traits::fulfill::FulfillProcessor>
  27:        0x11b29737f - <rustc_trait_selection[f2d930dd2783eb35]::traits::fulfill::FulfillmentContext as rustc_infer[dada4788a1f4a6f3]::traits::engine::TraitEngine>::select_where_possible
  28:        0x119c5da79 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_argument_types
  29:        0x119c33c7d - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::confirm_builtin_call
  30:        0x119c32411 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_call
  31:        0x119cb2532 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_kind
  32:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  33:        0x119cb2594 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_kind
  34:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:        0x119c66661 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_stmt
  36:        0x119c66d7c - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_block_with_expected
  37:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  38:        0x119cb58d1 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_kind
  39:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  40:        0x119c66539 - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_stmt
  41:        0x119c66d7c - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_block_with_expected
  42:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  43:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  44:        0x119c66dae - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_block_with_expected
  45:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  46:        0x119c451dd - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_return_expr
  47:        0x119dfa8a6 - rustc_hir_typeck[893aad13a1ca7d85]::check::check_fn
  48:        0x119cae96a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_closure
  49:        0x119c43c3a - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  50:        0x119c451dd - <rustc_hir_typeck[893aad13a1ca7d85]::fn_ctxt::FnCtxt>::check_return_expr
  51:        0x119dfa8a6 - rustc_hir_typeck[893aad13a1ca7d85]::check::check_fn
  52:        0x119de6fd2 - rustc_hir_typeck[893aad13a1ca7d85]::typeck
  53:        0x11ac3916f - rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 8usize]>>
  54:        0x11adbe00c - <rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::typeck::dynamic_query::{closure#2} as core[7d2d2f04a0a3cf2a]::ops::function::FnOnce<(rustc_middle[44406bf613825fc6]::ty::context::TyCtxt, rustc_span[ced6024ceb03e466]::def_id::LocalDefId)>>::call_once
  55:        0x11abfb8e1 - rustc_query_system[d58496f053c0d289]::query::plumbing::try_execute_query::<rustc_query_impl[f8a79d08ba0ddcf9]::DynamicConfig<rustc_query_system[d58496f053c0d289]::query::caches::VecCache<rustc_span[ced6024ceb03e466]::def_id::LocalDefId, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt, true>
  56:        0x11ab78268 - rustc_query_system[d58496f053c0d289]::query::plumbing::force_query::<rustc_query_impl[f8a79d08ba0ddcf9]::DynamicConfig<rustc_query_system[d58496f053c0d289]::query::caches::VecCache<rustc_span[ced6024ceb03e466]::def_id::LocalDefId, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  57:        0x11ac1b571 - <rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::query_callback<rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::typeck::QueryType>::{closure#0} as core[7d2d2f04a0a3cf2a]::ops::function::FnOnce<(rustc_middle[44406bf613825fc6]::ty::context::TyCtxt, rustc_query_system[d58496f053c0d289]::dep_graph::dep_node::DepNode)>>::call_once
  58:        0x11ac83f22 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  59:        0x11ac83f84 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  60:        0x11ac83f84 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  61:        0x11ac83ca6 - <rustc_query_system[d58496f053c0d289]::dep_graph::graph::DepGraphData<rustc_middle[44406bf613825fc6]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  62:        0x11ab7a76d - rustc_query_system[d58496f053c0d289]::query::plumbing::ensure_must_run::<rustc_query_impl[f8a79d08ba0ddcf9]::DynamicConfig<rustc_query_system[d58496f053c0d289]::query::caches::DefaultCache<rustc_span[ced6024ceb03e466]::def_id::LocalModDefId, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt>
  63:        0x11acd6806 - rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace
  64:        0x119ba9549 - rustc_hir_analysis[36207a74c89996d6]::check_crate
  65:        0x11a003270 - rustc_interface[af6ebd27ce945bf]::passes::analysis
  66:        0x11ac391ed - rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 1usize]>>
  67:        0x11ad30b39 - <rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::analysis::dynamic_query::{closure#2} as core[7d2d2f04a0a3cf2a]::ops::function::FnOnce<(rustc_middle[44406bf613825fc6]::ty::context::TyCtxt, ())>>::call_once
  68:        0x11ab82089 - rustc_query_system[d58496f053c0d289]::query::plumbing::try_execute_query::<rustc_query_impl[f8a79d08ba0ddcf9]::DynamicConfig<rustc_query_system[d58496f053c0d289]::query::caches::SingleCache<rustc_middle[44406bf613825fc6]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[f8a79d08ba0ddcf9]::plumbing::QueryCtxt, true>
  69:        0x11acc6c94 - rustc_query_impl[f8a79d08ba0ddcf9]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  70:        0x1197ee8d1 - <rustc_middle[44406bf613825fc6]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}::{closure#2}::{closure#6}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>
  71:        0x1197ed11a - rustc_span[ced6024ceb03e466]::set_source_map::<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_interface[af6ebd27ce945bf]::interface::run_compiler<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  72:        0x1197b5fec - <scoped_tls[5724fa55cbde1d37]::ScopedKey<rustc_span[ced6024ceb03e466]::SessionGlobals>>::set::<rustc_interface[af6ebd27ce945bf]::interface::run_compiler<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}>::{closure#0}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>
  73:        0x1197ee1fe - rustc_span[ced6024ceb03e466]::create_session_globals_then::<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_interface[af6ebd27ce945bf]::interface::run_compiler<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}>::{closure#0}>
  74:        0x1197e6c75 - std[69f244de2863e905]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[af6ebd27ce945bf]::util::run_in_thread_with_globals<rustc_interface[af6ebd27ce945bf]::interface::run_compiler<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}>::{closure#0}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>
  75:        0x1197bfede - <<std[69f244de2863e905]::thread::Builder>::spawn_unchecked_<rustc_interface[af6ebd27ce945bf]::util::run_in_thread_with_globals<rustc_interface[af6ebd27ce945bf]::interface::run_compiler<core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>, rustc_driver_impl[5b49da1f7667149]::run_compiler::{closure#1}>::{closure#0}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7d2d2f04a0a3cf2a]::result::Result<(), rustc_span[ced6024ceb03e466]::ErrorGuaranteed>>::{closure#1} as core[7d2d2f04a0a3cf2a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  76:        0x10e2d9d79 - std::sys::unix::thread::Thread::new::thread_start::hc4d1a801e7d23b95
  77:     0x7ff81dbab4e1 - __pthread_start

error: the compiler unexpectedly panicked. this is a bug.
```

</p>
</details>

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED] -C target-cpu=native