Repository: rust
Issue: ICE on stable 1.64.0 and nightly when running `cargo check`
Labels: I-ICE,T-compiler,C-bug,S-needs-repro

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.

http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/

-->

### Code

Code is proprietary unfortunately :( but I did narrow it down to a single line change.
The `create_session` signature looks like this: 
`pub async fn create_session(&self, params: CreateSessionParrams) -> Result<Session, Error>`
and the error happend after I modified the `CreateSessionParams` struct and added a new field called `custom_name: Option<String>`.
In the method itself I incorrectly wrote:

```rust
pub async fn create_session(&self, params: CreateSessionParrams) -> Result<Session, Error>
    let CreateSessionParams {
         custom_name: None,
         private,
         //...match of other fields
       } = params;
```
instead of:
```rust
pub async fn create_session(&self, params: CreateSessionParrams) -> Result<Session, Error>
    let CreateSessionParams {
         custom_name: _,
         private,
         //...match of other fields
       } = params;
```

Changing the above to the code below fixes the crash.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.64.0 (a55dd71d5 2022-09-19)
binary: rustc
commit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52
commit-date: 2022-09-19
host: x86_64-unknown-linux-gnu
release: 1.64.0
LLVM version: 14.0.6
```
Tested on ` rustc 1.66.0-nightly (a24a020e6 2022-10-18) running on x86_64-unknown-linux-gnu` as well with the same issue.

### Error output

```
    Checking ark-svc-session-manager-v2 v0.1.0 (/home/oskar/Desktop/ark/services/session-manager-v2)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_mir_build/src/build/matches/mod.rs:1853:53
stack backtrace:
   0:     0x7fb29c3f319d - std::backtrace_rs::backtrace::libunwind::trace::h9135f25bc195152c
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb29c3f319d - std::backtrace_rs::backtrace::trace_unsynchronized::h015ee85be510df51
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb29c3f319d - std::sys_common::backtrace::_print_fmt::h5fad03caa9652a2c
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fb29c3f319d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2b42ca28d244e5c7
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fb29c44e6ac - core::fmt::write::h401e827d053130ed
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/fmt/mod.rs:1198:17
   5:     0x7fb29c3e44e1 - std::io::Write::write_fmt::hffec93268f5cde32
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/io/mod.rs:1672:15
   6:     0x7fb29c3f5eb5 - std::sys_common::backtrace::_print::h180c4c706ee1d3fb
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fb29c3f5eb5 - std::sys_common::backtrace::print::hd0c35d18765761c9
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fb29c3f5eb5 - std::panicking::default_hook::{{closure}}::h1f023310983bc730
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:295:22
   9:     0x7fb29c3f5bd1 - std::panicking::default_hook::h188fec3334afd5be
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:314:9
  10:     0x7fb29ae45484 - rustc_driver[4568cc0a685fd94d]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fb29c3f65ea - std::panicking::rust_panic_with_hook::hf26e9d4f97b40096
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:702:17
  12:     0x7fb29c3f63e9 - std::panicking::begin_panic_handler::{{closure}}::hfab912107608087a
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:586:13
  13:     0x7fb29c3f3694 - std::sys_common::backtrace::__rust_end_short_backtrace::h434b685ce8d9965b
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7fb29c3f6159 - rust_begin_unwind
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
  15:     0x7fb29c44b1c3 - core::panicking::panic_fmt::ha6dc7f2ab2479463
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
  16:     0x7fb29c44b00d - core::panicking::panic::hb3ad04c589a0e3c8
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:48:5
  17:     0x7fb299ad171b - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::bind_and_guard_matched_candidate
  18:     0x7fb299add375 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::bind_pattern
  19:     0x7fb299add031 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::place_into_pattern
  20:     0x7fb299ad4980 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::ast_block_stmts
  21:     0x7fb299ac842d - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::ast_block
  22:     0x7fb299ab7cf3 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::expr_into_dest
  23:     0x7fb299ab6c01 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::expr_into_dest
  24:     0x7fb299ab6c01 - <rustc_mir_build[e26bc5dc52a321eb]::build::Builder>::expr_into_dest
  25:     0x7fb29a35c266 - rustc_mir_build[e26bc5dc52a321eb]::build::construct_fn::<core[6fcc70bcc91a5bf5]::iter::adapters::chain::Chain<alloc[6d6f83537459af52]::vec::into_iter::IntoIter<rustc_mir_build[e26bc5dc52a321eb]::build::ArgInfo>, core[6fcc70bcc91a5bf5]::iter::adapters::map::Map<core[6fcc70bcc91a5bf5]::iter::adapters::enumerate::Enumerate<core[6fcc70bcc91a5bf5]::slice::iter::Iter<rustc_hir[68ff11ce3a0002ca]::hir::Param>>, rustc_mir_build[e26bc5dc52a321eb]::build::mir_build::{closure#1}::{closure#1}>>>
  26:     0x7fb29a356823 - <rustc_infer[b9251f21a0aa6bc7]::infer::InferCtxtBuilder>::enter::<rustc_middle[b6cf56a787d1e2a1]::mir::Body, rustc_mir_build[e26bc5dc52a321eb]::build::mir_build::{closure#1}>
  27:     0x7fb29a3534b8 - rustc_mir_build[e26bc5dc52a321eb]::build::mir_built
  28:     0x7fb29a202abc - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>>
  29:     0x7fb29a20199e - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>>>
  30:     0x7fb29ad41a25 - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::mir_built
  31:     0x7fb299ea9072 - rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::unsafety_check_result
  32:     0x7fb299ea8780 - <rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::provide::{closure#0} as core[6fcc70bcc91a5bf5]::ops::function::FnOnce<(rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId)>>::call_once
  33:     0x7fb29a3715cf - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>
  34:     0x7fb29a36fce3 - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>>
  35:     0x7fb29ad42efe - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::unsafety_check_result
  36:     0x7fb299eac811 - rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::unsafety_check_result
  37:     0x7fb299ea8780 - <rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::provide::{closure#0} as core[6fcc70bcc91a5bf5]::ops::function::FnOnce<(rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId)>>::call_once
  38:     0x7fb29a3715cf - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>
  39:     0x7fb29a36fce3 - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>>
  40:     0x7fb29ad42efe - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::unsafety_check_result
  41:     0x7fb299eac811 - rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::unsafety_check_result
  42:     0x7fb299ea8780 - <rustc_mir_transform[41512ac2370fd0b8]::check_unsafety::provide::{closure#0} as core[6fcc70bcc91a5bf5]::ops::function::FnOnce<(rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId)>>::call_once
  43:     0x7fb29a3715cf - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>
  44:     0x7fb29a36fce3 - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::UnsafetyCheckResult>>
  45:     0x7fb29ad42efe - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::unsafety_check_result
  46:     0x7fb2996ed304 - rustc_mir_transform[41512ac2370fd0b8]::mir_const
  47:     0x7fb29a202abc - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>>
  48:     0x7fb29a20199e - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>>>
  49:     0x7fb29ad41b5c - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::mir_const
  50:     0x7fb299e8f473 - rustc_mir_transform[41512ac2370fd0b8]::mir_promoted
  51:     0x7fb29a73afdb - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, (&rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_index[6a9a4eedb2138cb2]::vec::IndexVec<rustc_middle[b6cf56a787d1e2a1]::mir::Promoted, rustc_middle[b6cf56a787d1e2a1]::mir::Body>>)>
  52:     0x7fb29a739e7c - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_middle[b6cf56a787d1e2a1]::ty::WithOptConstParam<rustc_span[721a57c036170ce]::def_id::LocalDefId>, (&rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_middle[b6cf56a787d1e2a1]::mir::Body>, &rustc_data_structures[49e7163a34b889d1]::steal::Steal<rustc_index[6a9a4eedb2138cb2]::vec::IndexVec<rustc_middle[b6cf56a787d1e2a1]::mir::Promoted, rustc_middle[b6cf56a787d1e2a1]::mir::Body>>)>>
  53:     0x7fb29ad42104 - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::mir_promoted
  54:     0x7fb29a8275e2 - rustc_borrowck[9bf94ea6123d60bb]::mir_borrowck
  55:     0x7fb29a826e60 - <rustc_borrowck[9bf94ea6123d60bb]::provide::{closure#0} as core[6fcc70bcc91a5bf5]::ops::function::FnOnce<(rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId)>>::call_once
  56:     0x7fb29a13a39f - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::BorrowCheckResult>
  57:     0x7fb29a13967d - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_span[721a57c036170ce]::def_id::LocalDefId, &rustc_middle[b6cf56a787d1e2a1]::mir::query::BorrowCheckResult>>
  58:     0x7fb29ad4356a - <rustc_query_impl[232efbc2900411f9]::Queries as rustc_middle[b6cf56a787d1e2a1]::ty::query::QueryEngine>::mir_borrowck
  59:     0x7fb29a8ceedc - rustc_typeck[8db86e16038c4234]::collect::type_of::type_of
  60:     0x7fb29a2231c7 - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::DefId, rustc_middle[b6cf56a787d1e2a1]::ty::Ty>
  61:     0x7fb29a22126b - rustc_query_system[8caf4755e287670e]::query::plumbing::get_query::<rustc_query_impl[232efbc2900411f9]::queries::type_of, rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt>
  62:     0x7fb29a2d8112 - rustc_typeck[8db86e16038c4234]::check::check::check_mod_item_types
  63:     0x7fb299fe4901 - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, rustc_span[721a57c036170ce]::def_id::LocalDefId, ()>
  64:     0x7fb299fe3ab6 - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<rustc_span[721a57c036170ce]::def_id::LocalDefId, ()>>
  65:     0x7fb29a8a94b3 - rustc_query_system[8caf4755e287670e]::query::plumbing::get_query::<rustc_query_impl[232efbc2900411f9]::queries::check_mod_item_types, rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt>
  66:     0x7fb29a8367ba - <rustc_session[98f7faf1d37bb5fb]::session::Session>::time::<(), rustc_typeck[8db86e16038c4234]::check_crate::{closure#6}>
  67:     0x7fb29a833d23 - rustc_typeck[8db86e16038c4234]::check_crate
  68:     0x7fb29a82f917 - rustc_interface[f934826ba4c12dd9]::passes::analysis
  69:     0x7fb29abea2bc - <rustc_query_system[8caf4755e287670e]::dep_graph::graph::DepGraph<rustc_middle[b6cf56a787d1e2a1]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[b6cf56a787d1e2a1]::ty::context::TyCtxt, (), core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>
  70:     0x7fb29abe9aab - rustc_query_system[8caf4755e287670e]::query::plumbing::try_execute_query::<rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt, rustc_query_system[8caf4755e287670e]::query::caches::DefaultCache<(), core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>>
  71:     0x7fb29abe95fe - rustc_query_system[8caf4755e287670e]::query::plumbing::get_query::<rustc_query_impl[232efbc2900411f9]::queries::analysis, rustc_query_impl[232efbc2900411f9]::plumbing::QueryCtxt>
  72:     0x7fb29a5c3d87 - <rustc_interface[f934826ba4c12dd9]::passes::QueryContext>::enter::<rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>
  73:     0x7fb29a5bc97f - <rustc_interface[f934826ba4c12dd9]::interface::Compiler>::enter::<rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}::{closure#2}, core[6fcc70bcc91a5bf5]::result::Result<core[6fcc70bcc91a5bf5]::option::Option<rustc_interface[f934826ba4c12dd9]::queries::Linker>, rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>
  74:     0x7fb29a5b186a - rustc_span[721a57c036170ce]::with_source_map::<core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>, rustc_interface[f934826ba4c12dd9]::interface::create_compiler_and_run<core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>, rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}>::{closure#1}>
  75:     0x7fb29a5b11a2 - <scoped_tls[80743de900a7f844]::ScopedKey<rustc_span[721a57c036170ce]::SessionGlobals>>::set::<rustc_interface[f934826ba4c12dd9]::interface::run_compiler<core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>, rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}>::{closure#0}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>
  76:     0x7fb29a5af5cf - std[306a94a967d8f5ee]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f934826ba4c12dd9]::util::run_in_thread_pool_with_globals<rustc_interface[f934826ba4c12dd9]::interface::run_compiler<core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>, rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}>::{closure#0}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>::{closure#0}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>
  77:     0x7fb29ac690b9 - <<std[306a94a967d8f5ee]::thread::Builder>::spawn_unchecked_<rustc_interface[f934826ba4c12dd9]::util::run_in_thread_pool_with_globals<rustc_interface[f934826ba4c12dd9]::interface::run_compiler<core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>, rustc_driver[4568cc0a685fd94d]::run_compiler::{closure#1}>::{closure#0}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>::{closure#0}, core[6fcc70bcc91a5bf5]::result::Result<(), rustc_errors[5fcb1a1f56a762e6]::ErrorGuaranteed>>::{closure#1} as core[6fcc70bcc91a5bf5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  78:     0x7fb29c400723 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h56d5fc072706762b
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9
  79:     0x7fb29c400723 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h41deef8e33b824bb
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/alloc/src/boxed.rs:1935:9
  80:     0x7fb29c400723 - std::sys::unix::thread::Thread::new::thread_start::ha6436304a1170bba
                               at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/sys/unix/thread.rs:108:17
  81:     0x7fb298294b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  82:     0x7fb298326a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  83:                0x0 - <unknown>
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.64.0 (a55dd71d5 2022-09-19) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=/usr/bin/clang -C incremental -C link-arg=-fuse-ld=mold -C link-arg=-Wl,--build-id=sha1 -C link-arg=-fuse-ld=/usr/local/bin/mold
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [mir_built] building MIR for `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}::{closure#0}`
#1 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}::{closure#0}`
#2 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}`
#3 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#4 [mir_const] processing MIR for `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#5 [mir_promoted] processing `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#6 [mir_borrowck] borrow-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#7 [type_of] computing type of `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{opaque#0}`
#8 [check_mod_item_types] checking item types in module `services::session_manager`
#9 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `ark-svc-session-manager-v2`
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong> Backtrace </strong></summary>
<p>

```
Checking ark-bootstrap-service v0.1.0 (/home/oskar/Desktop/ark/components/bootstrap-service)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_mir_build/src/build/matches/mod.rs:1853:53
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::panicking::panic
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:48:5
   3: <rustc_mir_build::build::Builder>::bind_and_guard_matched_candidate
   4: <rustc_mir_build::build::Builder>::bind_pattern
   5: <rustc_mir_build::build::Builder>::place_into_pattern
   6: <rustc_mir_build::build::Builder>::ast_block_stmts
   7: <rustc_mir_build::build::Builder>::ast_block
   8: <rustc_mir_build::build::Builder>::expr_into_dest
   9: <rustc_mir_build::build::Builder>::expr_into_dest
  10: <rustc_mir_build::build::Builder>::expr_into_dest
  11: rustc_mir_build::build::construct_fn::<core::iter::adapters::chain::Chain<alloc::vec::into_iter::IntoIter<rustc_mir_build::build::ArgInfo>, core::iter::adapters::map::Map<core::iter::adapters::enumerate::Enumerate<core::slice::iter::Iter<rustc_hir::hir::Param>>, rustc_mir_build::build::mir_build::{closure#1}::{closure#1}>>>
  12: <rustc_infer::infer::InferCtxtBuilder>::enter::<rustc_middle::mir::Body, rustc_mir_build::build::mir_build::{closure#1}>
  13: rustc_mir_build::build::mir_built
  14: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, &rustc_data_structures::steal::Steal<rustc_middle::mir::Body>>
  15: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, &rustc_data_structures::steal::Steal<rustc_middle::mir::Body>>>
  16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_built
  17: rustc_mir_transform::check_unsafety::unsafety_check_result
  18: <rustc_mir_transform::check_unsafety::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
  19: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>
  20: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>>
  21: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::unsafety_check_result
  22: rustc_mir_transform::check_unsafety::unsafety_check_result
  23: <rustc_mir_transform::check_unsafety::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
  24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>
  25: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>>
  26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::unsafety_check_result
  27: rustc_mir_transform::check_unsafety::unsafety_check_result
  28: <rustc_mir_transform::check_unsafety::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
  29: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>
  30: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::UnsafetyCheckResult>>
  31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::unsafety_check_result
  32: rustc_mir_transform::mir_const
  33: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, &rustc_data_structures::steal::Steal<rustc_middle::mir::Body>>
  34: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, &rustc_data_structures::steal::Steal<rustc_middle::mir::Body>>>
  35: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_const
  36: rustc_mir_transform::mir_promoted
  37: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, (&rustc_data_structures::steal::Steal<rustc_middle::mir::Body>, &rustc_data_structures::steal::Steal<rustc_index::vec::IndexVec<rustc_middle::mir::Promoted, rustc_middle::mir::Body>>)>
  38: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::WithOptConstParam<rustc_span::def_id::LocalDefId>, (&rustc_data_structures::steal::Steal<rustc_middle::mir::Body>, &rustc_data_structures::steal::Steal<rustc_index::vec::IndexVec<rustc_middle::mir::Promoted, rustc_middle::mir::Body>>)>>
  39: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_promoted
  40: rustc_borrowck::mir_borrowck
  41: <rustc_borrowck::provide::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
  42: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::BorrowCheckResult>
  43: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, &rustc_middle::mir::query::BorrowCheckResult>>
  44: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::mir_borrowck
  45: rustc_typeck::collect::type_of::type_of
  46: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId, rustc_middle::ty::Ty>
  47: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::type_of, rustc_query_impl::plumbing::QueryCtxt>
  48: rustc_typeck::check::check::check_mod_item_types
  49: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId, ()>
  50: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalDefId, ()>>
  51: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::check_mod_item_types, rustc_query_impl::plumbing::QueryCtxt>
  52: <rustc_session::session::Session>::time::<(), rustc_typeck::check_crate::{closure#6}>
  53: rustc_typeck::check_crate
  54: rustc_interface::passes::analysis
  55: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  56: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), core::result::Result<(), rustc_errors::ErrorGuaranteed>>>
  57: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::analysis, rustc_query_impl::plumbing::QueryCtxt>
  58: <rustc_interface::passes::QueryContext>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}::{closure#3}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
  59: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  60: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  61: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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.64.0 (a55dd71d5 2022-09-19) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C linker=/usr/bin/clang -C incremental -C link-arg=-fuse-ld=mold -C link-arg=-Wl,--build-id=sha1 -C link-arg=-fuse-ld=/usr/local/bin/mold

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_built] building MIR for `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}::{closure#0}`
#1 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}::{closure#0}`
#2 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{closure#0}`
#3 [unsafety_check_result] unsafety-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#4 [mir_const] processing MIR for `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#5 [mir_promoted] processing `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#6 [mir_borrowck] borrow-checking `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session`
#7 [type_of] computing type of `services::session_manager::<impl at services/session-manager-v2/src/services/session_manager.rs:60:1: 60:29>::create_session::{opaque#0}`
#8 [check_mod_item_types] checking item types in module `services::session_manager`
#9 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `ark-svc-session-manager-v2`
```

</p>
</details>