Repository: rust
Issue: Errors with join and spawn
Labels: I-ICE,T-compiler,C-bug,A-async-await,AsyncAwait-Triaged,E-needs-mcve

<!--
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

```Rust
 use futures::try_join;
use actix_rt::spawn;
async fn first() -> Result<S, CustomError> {
}

async fn second() -> Result<Y, CustomError> {
}

async fn route_endpoint() -> Result<_, CustomError> {
    spawn({
        try_join!(first(), second())
    });
}
```


### 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.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: aarch64-apple-darwin
release: 1.65.0
LLVM version: 15.0.0
```

### Error output

```
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/897e37553bba8b42751c67658967889d11ecd120/compiler/rustc_errors/src/lib.rs:1462:9
stack backtrace:
   0:        0x1012a3670 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h2990a6f24ccff6db
   1:        0x1012edc34 - core::fmt::write::h91497fd291c8b104
   2:        0x101296604 - std::io::Write::write_fmt::h23fa41342cffacf4
   3:        0x1012a5eec - std::panicking::default_hook::{{closure}}::hb41cdb784f4c17ac
   4:        0x1012a5c10 - std::panicking::default_hook::hdfe992d5fb29a991
   5:        0x10900a718 - rustc_driver[250dcea03822790c]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x1012a65b0 - std::panicking::rust_panic_with_hook::h2eb0e4b718773521
   7:        0x10cc741f4 - std[a5ccfe66677bd8c7]::panicking::begin_panic::<rustc_errors[c8454b970e154417]::ExplicitBug>::{closure#0}
   8:        0x10cc7277c - std[a5ccfe66677bd8c7]::sys_common::backtrace::__rust_end_short_backtrace::<std[a5ccfe66677bd8c7]::panicking::begin_panic<rustc_errors[c8454b970e154417]::ExplicitBug>::{closure#0}, !>
   9:        0x10d17ef48 - std[a5ccfe66677bd8c7]::panicking::begin_panic::<rustc_errors[c8454b970e154417]::ExplicitBug>
  10:        0x10cbd7904 - std[a5ccfe66677bd8c7]::panic::panic_any::<rustc_errors[c8454b970e154417]::ExplicitBug>
  11:        0x10cbd434c - <rustc_errors[c8454b970e154417]::HandlerInner>::bug::<&alloc[3ba61535766dd904]::string::String>
  12:        0x10cbd3c50 - <rustc_errors[c8454b970e154417]::Handler>::bug::<&alloc[3ba61535766dd904]::string::String>
  13:        0x10cd00640 - rustc_middle[a5107c7538e61c53]::ty::context::tls::with_context_opt::<rustc_middle[a5107c7538e61c53]::ty::context::tls::with_opt<rustc_middle[a5107c7538e61c53]::util::bug::opt_span_bug_fmt<rustc_span[b9fdb1d50c47c7fe]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  14:        0x10cd04994 - rustc_middle[a5107c7538e61c53]::util::bug::opt_span_bug_fmt::<rustc_span[b9fdb1d50c47c7fe]::span_encoding::Span>
  15:        0x10d17fe40 - rustc_middle[a5107c7538e61c53]::util::bug::bug_fmt
  16:        0x10ccb10fc - <rustc_middle[a5107c7538e61c53]::ty::context::TypeckResults>::node_type
  17:        0x10c9ae1b8 - <rustc_infer[95a93ab5ef712278]::infer::InferCtxt as rustc_trait_selection[20aa6160a2d29e77]::traits::error_reporting::suggestions::InferCtxtExt>::note_obligation_cause_code::<rustc_middle[a5107c7538e61c53]::ty::Predicate>
  18:        0x10c9b3964 - <rustc_infer[95a93ab5ef712278]::infer::InferCtxt as rustc_trait_selection[20aa6160a2d29e77]::traits::error_reporting::InferCtxtExt>::report_selection_error
  19:        0x10c9c129c - <rustc_infer[95a93ab5ef712278]::infer::InferCtxt as rustc_trait_selection[20aa6160a2d29e77]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  20:        0x10c9b08e8 - <rustc_infer[95a93ab5ef712278]::infer::InferCtxt as rustc_trait_selection[20aa6160a2d29e77]::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  21:        0x10b5f4640 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::resolve_vars_with_obligations
  22:        0x10b5e2ba8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::try_coerce
  23:        0x10b7d7140 - <rustc_typeck[4423ce6fa4a8f5dd]::check::coercion::CoerceMany<&rustc_hir[db6588c2747fedc8]::hir::Expr>>::coerce_inner
  24:        0x10b5ff0c4 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  25:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  26:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  27:        0x10b5fee38 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  28:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  29:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  30:        0x10b5f8e40 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_argument_types
  31:        0x10b5e2244 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  32:        0x10b5e049c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_call
  33:        0x10b62c360 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  34:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:        0x10b5fe7e8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_stmt
  36:        0x10b5fedf8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  37:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  38:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  39:        0x10b5fee38 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  40:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  41:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  42:        0x10b5eecfc - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_return_expr
  43:        0x10b676778 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_fn
  44:        0x10b62984c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_closure
  45:        0x10b62bed8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  46:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  47:        0x10b5f8e40 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_argument_types
  48:        0x10b5e2244 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  49:        0x10b5e049c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_call
  50:        0x10b62c360 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  51:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  52:        0x10b5f8e40 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_argument_types
  53:        0x10b5e2244 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  54:        0x10b5e049c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_call
  55:        0x10b62c360 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  56:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  57:        0x10b628040 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_match::{closure#0}
  58:        0x10b62c33c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  59:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  60:        0x10b628040 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_match::{closure#0}
  61:        0x10b62c33c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  62:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  63:        0x10b5fee38 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  64:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  65:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  66:        0x10b5eecfc - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_return_expr
  67:        0x10b676778 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_fn
  68:        0x10b62984c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_closure
  69:        0x10b62bed8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  70:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  71:        0x10b5f8e40 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_argument_types
  72:        0x10b5e2244 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  73:        0x10b5e049c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_call
  74:        0x10b62c360 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  75:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  76:        0x10b5fe298 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_decl
  77:        0x10b5fe658 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_stmt
  78:        0x10b5fedf8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  79:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  80:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  81:        0x10b62bf14 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  82:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  83:        0x10b5fee38 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_block_with_expected
  84:        0x10b62c590 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  85:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  86:        0x10b5eecfc - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_return_expr
  87:        0x10b676778 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_fn
  88:        0x10b62984c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_closure
  89:        0x10b62bed8 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  90:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  91:        0x10b5f8e40 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_argument_types
  92:        0x10b5e2244 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::confirm_builtin_call
  93:        0x10b5e049c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_call
  94:        0x10b62c360 - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_kind
  95:        0x10b5ee07c - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  96:        0x10b5eecfc - <rustc_typeck[4423ce6fa4a8f5dd]::check::fn_ctxt::FnCtxt>::check_return_expr
  97:        0x10b676778 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_fn
  98:        0x10b74cb94 - <rustc_infer[95a93ab5ef712278]::infer::InferCtxtBuilder>::enter::<&rustc_middle[a5107c7538e61c53]::ty::context::TypeckResults, <rustc_typeck[4423ce6fa4a8f5dd]::check::inherited::InheritedBuilder>::enter<rustc_typeck[4423ce6fa4a8f5dd]::check::typeck_with_fallback<rustc_typeck[4423ce6fa4a8f5dd]::check::typeck::{closure#0}>::{closure#1}, &rustc_middle[a5107c7538e61c53]::ty::context::TypeckResults>::{closure#0}>
  99:        0x10b6ceab0 - rustc_typeck[4423ce6fa4a8f5dd]::check::typeck
 100:        0x10c1b264c - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::ty::context::TypeckResults>
 101:        0x10bf8aee4 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::ty::context::TypeckResults>>
 102:        0x10c04ac20 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::typeck, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 103:        0x10ccb24d0 - <rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt>::typeck_opt_const_arg
 104:        0x10ba75770 - rustc_mir_build[1f3fcf865c2fac6]::thir::cx::thir_body
 105:        0x10c0771cc - <rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind as rustc_query_system[376554ccb6bbe62f]::dep_graph::DepKind>::with_deps::<<rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, core[75a5a00debbb3d3d]::result::Result<(&rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::thir::Thir>, rustc_middle[a5107c7538e61c53]::thir::ExprId), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(&rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::thir::Thir>, rustc_middle[a5107c7538e61c53]::thir::ExprId), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 106:        0x10c1a4c6c - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, core[75a5a00debbb3d3d]::result::Result<(&rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::thir::Thir>, rustc_middle[a5107c7538e61c53]::thir::ExprId), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 107:        0x10bf687a4 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, core[75a5a00debbb3d3d]::result::Result<(&rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::thir::Thir>, rustc_middle[a5107c7538e61c53]::thir::ExprId), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>>
 108:        0x10c04d3e0 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::thir_body, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 109:        0x10c2853dc - <rustc_query_impl[ebd438b5e01d582b]::Queries as rustc_middle[a5107c7538e61c53]::ty::query::QueryEngine>::thir_body
 110:        0x10ba2ee04 - rustc_mir_build[1f3fcf865c2fac6]::build::mir_built
 111:        0x10c07736c - <rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind as rustc_query_system[376554ccb6bbe62f]::dep_graph::DepKind>::with_deps::<<rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, &rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::mir::Body>>::{closure#0}, &rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::mir::Body>>
 112:        0x10c1a5548 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, &rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::mir::Body>>
 113:        0x10bf69510 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_middle[a5107c7538e61c53]::ty::WithOptConstParam<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId>, &rustc_data_structures[25d5b65341446d42]::steal::Steal<rustc_middle[a5107c7538e61c53]::mir::Body>>>
 114:        0x10c04cec0 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::mir_built, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 115:        0x10c2854b0 - <rustc_query_impl[ebd438b5e01d582b]::Queries as rustc_middle[a5107c7538e61c53]::ty::query::QueryEngine>::mir_built
 116:        0x10b42d31c - rustc_mir_transform[baec599cf1572bba]::check_unsafety::unsafety_check_result
 117:        0x10b42a650 - <rustc_mir_transform[baec599cf1572bba]::check_unsafety::provide::{closure#0} as core[75a5a00debbb3d3d]::ops::function::FnOnce<(rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId)>>::call_once
 118:        0x10c1b33a8 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::mir::query::UnsafetyCheckResult>
 119:        0x10bf8cb3c - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::mir::query::UnsafetyCheckResult>>
 120:        0x10bf1dbcc - rustc_query_system[376554ccb6bbe62f]::query::plumbing::force_query::<rustc_query_impl[ebd438b5e01d582b]::queries::unsafety_check_result, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 121:        0x10c247eec - rustc_query_impl[ebd438b5e01d582b]::plumbing::force_from_dep_node::<rustc_query_impl[ebd438b5e01d582b]::queries::unsafety_check_result>
 122:        0x10cca3518 - <rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt as rustc_query_system[376554ccb6bbe62f]::dep_graph::DepContext>::try_force_from_dep_node
 123:        0x10c1a0610 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 124:        0x10c1a05e0 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 125:        0x10c1a05e0 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 126:        0x10c170db0 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 127:        0x10c0111a0 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::mir::query::BorrowCheckResult>
 128:        0x10bf8b904 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, &rustc_middle[a5107c7538e61c53]::mir::query::BorrowCheckResult>>
 129:        0x10c032124 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::mir_borrowck, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 130:        0x10b6d8d40 - rustc_typeck[4423ce6fa4a8f5dd]::collect::type_of::find_opaque_ty_constraints_for_rpit
 131:        0x10c1bb8d0 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::DefId, rustc_middle[a5107c7538e61c53]::ty::Ty>
 132:        0x10bfa5fe8 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_span[b9fdb1d50c47c7fe]::def_id::DefId, rustc_middle[a5107c7538e61c53]::ty::Ty>>
 133:        0x10c04aef8 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::type_of, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 134:        0x10b65ee2c - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_opaque
 135:        0x10b65ff50 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_item_type
 136:        0x10b6667d0 - rustc_typeck[4423ce6fa4a8f5dd]::check::check::check_mod_item_types
 137:        0x10c1b3c98 - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, ()>
 138:        0x10bf8e7b8 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<rustc_span[b9fdb1d50c47c7fe]::def_id::LocalDefId, ()>>
 139:        0x10c03bc20 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::check_mod_item_types, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 140:        0x10b6a6264 - <rustc_middle[a5107c7538e61c53]::hir::map::Map>::for_each_module::<rustc_typeck[4423ce6fa4a8f5dd]::check_crate::{closure#6}::{closure#0}>
 141:        0x10b6e197c - <rustc_session[d9f8ead3a6f8da8f]::session::Session>::time::<(), rustc_typeck[4423ce6fa4a8f5dd]::check_crate::{closure#6}>
 142:        0x10b7d4558 - rustc_typeck[4423ce6fa4a8f5dd]::check_crate
 143:        0x1091190f0 - rustc_interface[64ac8d545596c047]::passes::analysis
 144:        0x10c1d60ec - <rustc_query_system[376554ccb6bbe62f]::dep_graph::graph::DepGraph<rustc_middle[a5107c7538e61c53]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[a5107c7538e61c53]::ty::context::TyCtxt, (), core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 145:        0x10bfe4000 - rustc_query_system[376554ccb6bbe62f]::query::plumbing::try_execute_query::<rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt, rustc_query_system[376554ccb6bbe62f]::query::caches::DefaultCache<(), core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>>
 146:        0x10c04b02c - rustc_query_system[376554ccb6bbe62f]::query::plumbing::get_query::<rustc_query_impl[ebd438b5e01d582b]::queries::analysis, rustc_query_impl[ebd438b5e01d582b]::plumbing::QueryCtxt>
 147:        0x10903b054 - <rustc_interface[64ac8d545596c047]::passes::QueryContext>::enter::<rustc_driver[250dcea03822790c]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 148:        0x1090101b4 - rustc_interface[64ac8d545596c047]::interface::create_compiler_and_run::<core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>, rustc_driver[250dcea03822790c]::run_compiler::{closure#1}>
 149:        0x1090735e0 - <scoped_tls[1c31aea71029b747]::ScopedKey<rustc_span[b9fdb1d50c47c7fe]::SessionGlobals>>::set::<rustc_interface[64ac8d545596c047]::interface::run_compiler<core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>, rustc_driver[250dcea03822790c]::run_compiler::{closure#1}>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 150:        0x10903edc8 - std[a5ccfe66677bd8c7]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[64ac8d545596c047]::util::run_in_thread_pool_with_globals<rustc_interface[64ac8d545596c047]::interface::run_compiler<core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>, rustc_driver[250dcea03822790c]::run_compiler::{closure#1}>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>
 151:        0x109041c4c - <<std[a5ccfe66677bd8c7]::thread::Builder>::spawn_unchecked_<rustc_interface[64ac8d545596c047]::util::run_in_thread_pool_with_globals<rustc_interface[64ac8d545596c047]::interface::run_compiler<core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>, rustc_driver[250dcea03822790c]::run_compiler::{closure#1}>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>::{closure#0}, core[75a5a00debbb3d3d]::result::Result<(), rustc_errors[c8454b970e154417]::ErrorGuaranteed>>::{closure#1} as core[75a5a00debbb3d3d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 152:        0x1012ae428 - std::sys::unix::thread::Thread::new::thread_start::hf682c03d0f237892
 153:        0x1ae50d240 - __pthread_deallocate

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.65.0 (897e37553 2022-11-02) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden
```

<!--
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>

```
<backtrace>
```

</p>
</details>