Repository: rust
Issue: ice: `thread caused non-unwinding panic`
Labels: I-ICE,T-compiler,C-bug,requires-nightly

<!--
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
`tests/ui/async-await/issue-74047.rs -Ztreat-err-as-bug=3 --edition=2018`
```Rust
// edition:2018

use std::convert::{TryFrom, TryInto};
use std::io;

pub struct MyStream;
pub struct OtherStream;

pub async fn connect() -> io::Result<MyStream> {
    let stream: MyStream = OtherStream.try_into()?;
    Ok(stream)
}

impl TryFrom<OtherStream> for MyStream {}
//~^ ERROR: missing

fn main() {}
```


### 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.72.0-nightly (330727467 2023-06-29)
binary: rustc
commit-hash: 330727467b8fdf2c43b95095a0efae7012c4f83b
commit-date: 2023-06-29
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5
```

### Error output

```
<output>
```

<!--
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>

```
error: internal compiler error: broken MIR in DefId(0:12 ~ issue_74047[eb6d]::connect::{closure#0}) (<Result<MyStream, {type error}> as Try>::branch): bad type fn(std::result::Result<MyStream, {type error}>) -> std::ops::ControlFlow<<std::result::Result<MyStream, {type error}> as std::ops::Try>::Residual, <std::result::Result<MyStream, {type error}> as std::ops::Try>::Output> {<std::result::Result<MyStream, {type error}> as std::ops::Try>::branch}
  --> /home/matthias/vcs/github/rust/tests/ui/async-await/issue-74047.rs:10:28
   |
10 |     let stream: MyStream = OtherStream.try_into()?;
   |                            ^^^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at 'aborting after 1 errors and 3 delayed bugs due to `-Z treat-err-as-bug=3`', compiler/rustc_errors/src/lib.rs:1715:25
stack backtrace:
   0:     0x7fbc92167e31 - std::backtrace_rs::backtrace::libunwind::trace::haad1063de976ceb2
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fbc92167e31 - std::backtrace_rs::backtrace::trace_unsynchronized::h7b51363c81a7b256
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fbc92167e31 - std::sys_common::backtrace::_print_fmt::he13168438598557b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fbc92167e31 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1d2d1ffaeb85b14
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fbc921c95df - core::fmt::rt::Argument::fmt::h0e008ff216d9ed35
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/rt.rs:138:9
   5:     0x7fbc921c95df - core::fmt::write::h7b5b4afd08e8dd5d
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fbc9215a867 - std::io::Write::write_fmt::h94cea5b4cf0efb5e
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/io/mod.rs:1714:15
   7:     0x7fbc92167c45 - std::sys_common::backtrace::_print::h55a2acbd181983ca
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fbc92167c45 - std::sys_common::backtrace::print::hb3c494ba0c106a86
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fbc9216a9f3 - std::panicking::default_hook::{{closure}}::hfbe22e59c5f2ad71
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:269:22
  10:     0x7fbc9216a784 - std::panicking::default_hook::hefcc18044a23601b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:288:9
  11:     0x7fbc953dc2fb - rustc_driver_impl[9b4d7c25c63e73b3]::install_ice_hook::{closure#0}
  12:     0x7fbc9216b21e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8894d7e48c6dcf9c
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2024:9
  13:     0x7fbc9216b21e - std::panicking::rust_panic_with_hook::hf982b5f4c4f885ab
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:709:13
  14:     0x7fbc9216afa7 - std::panicking::begin_panic_handler::{{closure}}::h946b3a68a298a1d1
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:597:13
  15:     0x7fbc92168266 - std::sys_common::backtrace::__rust_end_short_backtrace::h9a7e065450f10f2b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:151:18
  16:     0x7fbc9216acf2 - rust_begin_unwind
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:593:5
  17:     0x7fbc921c5833 - core::panicking::panic_fmt::h6c63e4d00e6f795a
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/panicking.rs:67:14
  18:     0x7fbc94b2c9f3 - <rustc_errors[6467057ac24fce3]::HandlerInner>::panic_if_treat_err_as_bug
  19:     0x7fbc94b29e5f - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diagnostic::{closure#2}
  20:     0x7fbc94b34a24 - rustc_interface[b5a070060ba77ac7]::callbacks::track_diagnostic
  21:     0x7fbc93eded90 - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diagnostic
  22:     0x7fbc951a5141 - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diag_at_span::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span>
  23:     0x7fbc951a52e6 - <rustc_errors[6467057ac24fce3]::HandlerInner>::span_bug::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span, alloc[82e17cff8555a4d9]::string::String>
  24:     0x7fbc94279e3b - <rustc_errors[6467057ac24fce3]::Handler>::delay_span_bug::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span, alloc[82e17cff8555a4d9]::string::String>
  25:     0x7fbc9426fd9c - <rustc_borrowck[736afdce5e48dcaf]::type_check::TypeVerifier as rustc_middle[a3748bd56bb891fc]::mir::visit::Visitor>::visit_constant
  26:     0x7fbc94254e17 - <rustc_borrowck[736afdce5e48dcaf]::type_check::TypeVerifier as rustc_middle[a3748bd56bb891fc]::mir::visit::Visitor>::visit_body
  27:     0x7fbc9420de18 - rustc_borrowck[736afdce5e48dcaf]::type_check::type_check
  28:     0x7fbc94202f7d - rustc_borrowck[736afdce5e48dcaf]::nll::compute_regions
  29:     0x7fbc941c9dee - rustc_borrowck[736afdce5e48dcaf]::do_mir_borrowck
  30:     0x7fbc941c7fbe - rustc_borrowck[736afdce5e48dcaf]::mir_borrowck
  31:     0x7fbc934401be - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  32:     0x7fbc9344018e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  33:     0x7fbc935110cd - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  34:     0x7fbc94d61921 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  35:     0x7fbc944b221f - <rustc_borrowck[736afdce5e48dcaf]::type_check::TypeChecker>::prove_closure_bounds
  36:     0x7fbc944800c6 - <rustc_borrowck[736afdce5e48dcaf]::type_check::TypeChecker>::typeck_mir
  37:     0x7fbc9420de2a - rustc_borrowck[736afdce5e48dcaf]::type_check::type_check
  38:     0x7fbc94202f7d - rustc_borrowck[736afdce5e48dcaf]::nll::compute_regions
  39:     0x7fbc941c9dee - rustc_borrowck[736afdce5e48dcaf]::do_mir_borrowck
  40:     0x7fbc941c7fbe - rustc_borrowck[736afdce5e48dcaf]::mir_borrowck
  41:     0x7fbc934401be - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7fbc9344018e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  43:     0x7fbc935110cd - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  44:     0x7fbc94d61921 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7fbc9459a48a - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  46:     0x7fbc94597031 - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::type_of
  47:     0x7fbc93531d43 - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  48:     0x7fbc93531d00 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::DefId)>>::call_once
  49:     0x7fbc934391a5 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  50:     0x7fbc94d9b153 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  51:     0x7fbc94368616 - rustc_middle[a3748bd56bb891fc]::query::plumbing::query_get_at::<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>>
  52:     0x7fbc94362640 - rustc_hir_analysis[f398ef5a99cc0c76]::check::check::check_mod_item_types
  53:     0x7fbc93fca04c - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>
  54:     0x7fbc93fca02e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  55:     0x7fbc93a96c3f - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  56:     0x7fbc94d9cf64 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  57:     0x7fbc948391b7 - <rustc_middle[a3748bd56bb891fc]::hir::map::Map>::for_each_module::<rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}::{closure#0}>
  58:     0x7fbc948385ed - <rustc_session[2764332d99038636]::session::Session>::time::<(), rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}>
  59:     0x7fbc94837297 - rustc_hir_analysis[f398ef5a99cc0c76]::check_crate
  60:     0x7fbc9482d2da - rustc_interface[b5a070060ba77ac7]::passes::analysis
  61:     0x7fbc948dc91a - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>
  62:     0x7fbc948dc909 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, ())>>::call_once
  63:     0x7fbc94a7be18 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::SingleCache<rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  64:     0x7fbc94a7bbe9 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  65:     0x7fbc946a39c5 - <rustc_middle[a3748bd56bb891fc]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  66:     0x7fbc946a2ff1 - <rustc_interface[b5a070060ba77ac7]::interface::Compiler>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}, core[f83c350bdee9593e]::result::Result<core[f83c350bdee9593e]::option::Option<rustc_interface[b5a070060ba77ac7]::queries::Linker>, rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  67:     0x7fbc94699b55 - rustc_span[8c8cff5746e8a1c7]::set_source_map::<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  68:     0x7fbc94698f76 - <scoped_tls[bb3d9e7e2f92750f]::ScopedKey<rustc_span[8c8cff5746e8a1c7]::SessionGlobals>>::set::<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  69:     0x7fbc94698526 - std[546c48fd97b1d9d5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  70:     0x7fbc94c6f9ae - <<std[546c48fd97b1d9d5]::thread::Builder>::spawn_unchecked_<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#1} as core[f83c350bdee9593e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  71:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4b035f338583a276
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  72:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha82e570518d356ed
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  73:     0x7fbc92175695 - std::sys::unix::thread::Thread::new::thread_start::h3656904c32ed5a49
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys/unix/thread.rs:108:17
  74:     0x7fbc91f0d44b - <unknown>
  75:     0x7fbc91f90e40 - <unknown>
  76:                0x0 - <unknown>

error: 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.72.0-nightly (330727467 2023-06-29) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z treat-err-as-bug=3

query stack during panic:
#0 [mir_borrowck] borrow-checking `connect::{closure#0}`
#1 [mir_borrowck] borrow-checking `connect`
#2 [type_of] computing type of `connect::{opaque#0}`
#3 [check_mod_item_types] checking item types in top-level module
#4 [analysis] running analysis passes on this crate
end of query stack
error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:15 ~ issue_74047[eb6d]::connect::{opaque#0}), substs: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: /home/matthias/vcs/github/rust/tests/ui/async-await/issue-74047.rs:9:48: 12:2 (#0), ty: [async fn body@/home/matthias/vcs/github/rust/tests/ui/async-await/issue-74047.rs:9:48: 12:2] } }}

thread 'rustc' panicked at 'aborting after 2 errors and 3 delayed bugs due to `-Z treat-err-as-bug=3`', compiler/rustc_errors/src/lib.rs:1715:25
stack backtrace:
   0:     0x7fbc92167e31 - std::backtrace_rs::backtrace::libunwind::trace::haad1063de976ceb2
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fbc92167e31 - std::backtrace_rs::backtrace::trace_unsynchronized::h7b51363c81a7b256
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fbc92167e31 - std::sys_common::backtrace::_print_fmt::he13168438598557b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fbc92167e31 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1d2d1ffaeb85b14
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fbc921c95df - core::fmt::rt::Argument::fmt::h0e008ff216d9ed35
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/rt.rs:138:9
   5:     0x7fbc921c95df - core::fmt::write::h7b5b4afd08e8dd5d
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fbc9215a867 - std::io::Write::write_fmt::h94cea5b4cf0efb5e
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/io/mod.rs:1714:15
   7:     0x7fbc92167c45 - std::sys_common::backtrace::_print::h55a2acbd181983ca
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fbc92167c45 - std::sys_common::backtrace::print::hb3c494ba0c106a86
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fbc9216a9f3 - std::panicking::default_hook::{{closure}}::hfbe22e59c5f2ad71
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:269:22
  10:     0x7fbc9216a784 - std::panicking::default_hook::hefcc18044a23601b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:288:9
  11:     0x7fbc953dc2fb - rustc_driver_impl[9b4d7c25c63e73b3]::install_ice_hook::{closure#0}
  12:     0x7fbc9216b21e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8894d7e48c6dcf9c
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2024:9
  13:     0x7fbc9216b21e - std::panicking::rust_panic_with_hook::hf982b5f4c4f885ab
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:709:13
  14:     0x7fbc9216afa7 - std::panicking::begin_panic_handler::{{closure}}::h946b3a68a298a1d1
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:597:13
  15:     0x7fbc92168266 - std::sys_common::backtrace::__rust_end_short_backtrace::h9a7e065450f10f2b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:151:18
  16:     0x7fbc9216acf2 - rust_begin_unwind
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:593:5
  17:     0x7fbc921c5833 - core::panicking::panic_fmt::h6c63e4d00e6f795a
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/panicking.rs:67:14
  18:     0x7fbc94b2c9f3 - <rustc_errors[6467057ac24fce3]::HandlerInner>::panic_if_treat_err_as_bug
  19:     0x7fbc94b29e5f - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diagnostic::{closure#2}
  20:     0x7fbc94b34a24 - rustc_interface[b5a070060ba77ac7]::callbacks::track_diagnostic
  21:     0x7fbc93eded90 - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diagnostic
  22:     0x7fbc95752b21 - <rustc_errors[6467057ac24fce3]::HandlerInner>::emit_diag_at_span::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span>
  23:     0x7fbc95752c16 - <rustc_errors[6467057ac24fce3]::HandlerInner>::span_bug::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span, alloc[82e17cff8555a4d9]::string::String>
  24:     0x7fbc957520bb - <rustc_errors[6467057ac24fce3]::Handler>::delay_span_bug::<rustc_span[8c8cff5746e8a1c7]::span_encoding::Span, alloc[82e17cff8555a4d9]::string::String>
  25:     0x7fbc941c8e6e - core[f83c350bdee9593e]::ptr::drop_in_place::<rustc_infer[df338615b53cee92]::infer::InferCtxt>
  26:     0x7fbc941c8499 - rustc_borrowck[736afdce5e48dcaf]::mir_borrowck
  27:     0x7fbc934401be - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7fbc9344018e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  29:     0x7fbc935110cd - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  30:     0x7fbc94d61921 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7fbc9459a48a - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  32:     0x7fbc94597031 - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::type_of
  33:     0x7fbc93531d43 - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  34:     0x7fbc93531d00 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::DefId)>>::call_once
  35:     0x7fbc934391a5 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  36:     0x7fbc94d9b153 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7fbc94368616 - rustc_middle[a3748bd56bb891fc]::query::plumbing::query_get_at::<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>>
  38:     0x7fbc94362640 - rustc_hir_analysis[f398ef5a99cc0c76]::check::check::check_mod_item_types
  39:     0x7fbc93fca04c - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>
  40:     0x7fbc93fca02e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  41:     0x7fbc93a96c3f - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  42:     0x7fbc94d9cf64 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  43:     0x7fbc948391b7 - <rustc_middle[a3748bd56bb891fc]::hir::map::Map>::for_each_module::<rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}::{closure#0}>
  44:     0x7fbc948385ed - <rustc_session[2764332d99038636]::session::Session>::time::<(), rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}>
  45:     0x7fbc94837297 - rustc_hir_analysis[f398ef5a99cc0c76]::check_crate
  46:     0x7fbc9482d2da - rustc_interface[b5a070060ba77ac7]::passes::analysis
  47:     0x7fbc948dc91a - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>
  48:     0x7fbc948dc909 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, ())>>::call_once
  49:     0x7fbc94a7be18 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::SingleCache<rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  50:     0x7fbc94a7bbe9 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  51:     0x7fbc946a39c5 - <rustc_middle[a3748bd56bb891fc]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  52:     0x7fbc946a2ff1 - <rustc_interface[b5a070060ba77ac7]::interface::Compiler>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}, core[f83c350bdee9593e]::result::Result<core[f83c350bdee9593e]::option::Option<rustc_interface[b5a070060ba77ac7]::queries::Linker>, rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  53:     0x7fbc94699b55 - rustc_span[8c8cff5746e8a1c7]::set_source_map::<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  54:     0x7fbc94698f76 - <scoped_tls[bb3d9e7e2f92750f]::ScopedKey<rustc_span[8c8cff5746e8a1c7]::SessionGlobals>>::set::<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  55:     0x7fbc94698526 - std[546c48fd97b1d9d5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  56:     0x7fbc94c6f9ae - <<std[546c48fd97b1d9d5]::thread::Builder>::spawn_unchecked_<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#1} as core[f83c350bdee9593e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  57:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4b035f338583a276
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  58:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha82e570518d356ed
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  59:     0x7fbc92175695 - std::sys::unix::thread::Thread::new::thread_start::h3656904c32ed5a49
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys/unix/thread.rs:108:17
  60:     0x7fbc91f0d44b - <unknown>
  61:     0x7fbc91f90e40 - <unknown>
  62:                0x0 - <unknown>

error: 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.72.0-nightly (330727467 2023-06-29) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z treat-err-as-bug=3

query stack during panic:
#0 [mir_borrowck] borrow-checking `connect`
#1 [type_of] computing type of `connect::{opaque#0}`
#2 [check_mod_item_types] checking item types in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:126:5
stack backtrace:
   0:     0x7fbc92167e31 - std::backtrace_rs::backtrace::libunwind::trace::haad1063de976ceb2
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fbc92167e31 - std::backtrace_rs::backtrace::trace_unsynchronized::h7b51363c81a7b256
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fbc92167e31 - std::sys_common::backtrace::_print_fmt::he13168438598557b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fbc92167e31 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1d2d1ffaeb85b14
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fbc921c95df - core::fmt::rt::Argument::fmt::h0e008ff216d9ed35
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/rt.rs:138:9
   5:     0x7fbc921c95df - core::fmt::write::h7b5b4afd08e8dd5d
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fbc9215a867 - std::io::Write::write_fmt::h94cea5b4cf0efb5e
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/io/mod.rs:1714:15
   7:     0x7fbc92167c45 - std::sys_common::backtrace::_print::h55a2acbd181983ca
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fbc92167c45 - std::sys_common::backtrace::print::hb3c494ba0c106a86
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fbc9216a9f3 - std::panicking::default_hook::{{closure}}::hfbe22e59c5f2ad71
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:269:22
  10:     0x7fbc9216a784 - std::panicking::default_hook::hefcc18044a23601b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:288:9
  11:     0x7fbc953dc2fb - rustc_driver_impl[9b4d7c25c63e73b3]::install_ice_hook::{closure#0}
  12:     0x7fbc9216b21e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8894d7e48c6dcf9c
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2024:9
  13:     0x7fbc9216b21e - std::panicking::rust_panic_with_hook::hf982b5f4c4f885ab
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:709:13
  14:     0x7fbc9216af61 - std::panicking::begin_panic_handler::{{closure}}::h946b3a68a298a1d1
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:595:13
  15:     0x7fbc92168266 - std::sys_common::backtrace::__rust_end_short_backtrace::h9a7e065450f10f2b
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys_common/backtrace.rs:151:18
  16:     0x7fbc9216acf2 - rust_begin_unwind
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/panicking.rs:593:5
  17:     0x7fbc921c5873 - core::panicking::panic_nounwind_fmt::ha2e5ab3e0bc4c38f
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/panicking.rs:96:14
  18:     0x7fbc921c5917 - core::panicking::panic_nounwind::h1430979843633777
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/panicking.rs:126:5
  19:     0x7fbc921c5aa3 - core::panicking::panic_cannot_unwind::h2c50900cdcadcc40
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/core/src/panicking.rs:189:5
  20:     0x7fbc941c8514 - rustc_borrowck[736afdce5e48dcaf]::mir_borrowck
  21:     0x7fbc934401be - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  22:     0x7fbc9344018e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  23:     0x7fbc935110cd - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  24:     0x7fbc94d61921 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  25:     0x7fbc9459a48a - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::opaque::find_opaque_ty_constraints_for_rpit
  26:     0x7fbc94597031 - rustc_hir_analysis[f398ef5a99cc0c76]::collect::type_of::type_of
  27:     0x7fbc93531d43 - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>
  28:     0x7fbc93531d00 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::DefId)>>::call_once
  29:     0x7fbc934391a5 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  30:     0x7fbc94d9b153 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7fbc94368616 - rustc_middle[a3748bd56bb891fc]::query::plumbing::query_get_at::<rustc_query_system[4817075f3f648479]::query::caches::DefaultCache<rustc_span[8c8cff5746e8a1c7]::def_id::DefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 8usize]>>>
  32:     0x7fbc94362640 - rustc_hir_analysis[f398ef5a99cc0c76]::check::check::check_mod_item_types
  33:     0x7fbc93fca04c - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>
  34:     0x7fbc93fca02e - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId)>>::call_once
  35:     0x7fbc93a96c3f - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::VecCache<rustc_span[8c8cff5746e8a1c7]::def_id::LocalDefId, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  36:     0x7fbc94d9cf64 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::check_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7fbc948391b7 - <rustc_middle[a3748bd56bb891fc]::hir::map::Map>::for_each_module::<rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}::{closure#0}>
  38:     0x7fbc948385ed - <rustc_session[2764332d99038636]::session::Session>::time::<(), rustc_hir_analysis[f398ef5a99cc0c76]::check_crate::{closure#6}>
  39:     0x7fbc94837297 - rustc_hir_analysis[f398ef5a99cc0c76]::check_crate
  40:     0x7fbc9482d2da - rustc_interface[b5a070060ba77ac7]::passes::analysis
  41:     0x7fbc948dc91a - rustc_query_impl[8dfa89dacc1033d6]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>
  42:     0x7fbc948dc909 - <rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::dynamic_query::{closure#2} as core[f83c350bdee9593e]::ops::function::FnOnce<(rustc_middle[a3748bd56bb891fc]::ty::context::TyCtxt, ())>>::call_once
  43:     0x7fbc94a7be18 - rustc_query_system[4817075f3f648479]::query::plumbing::try_execute_query::<rustc_query_impl[8dfa89dacc1033d6]::DynamicConfig<rustc_query_system[4817075f3f648479]::query::caches::SingleCache<rustc_middle[a3748bd56bb891fc]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[8dfa89dacc1033d6]::plumbing::QueryCtxt, false>
  44:     0x7fbc94a7bbe9 - rustc_query_impl[8dfa89dacc1033d6]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7fbc946a39c5 - <rustc_middle[a3748bd56bb891fc]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  46:     0x7fbc946a2ff1 - <rustc_interface[b5a070060ba77ac7]::interface::Compiler>::enter::<rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}::{closure#2}, core[f83c350bdee9593e]::result::Result<core[f83c350bdee9593e]::option::Option<rustc_interface[b5a070060ba77ac7]::queries::Linker>, rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  47:     0x7fbc94699b55 - rustc_span[8c8cff5746e8a1c7]::set_source_map::<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  48:     0x7fbc94698f76 - <scoped_tls[bb3d9e7e2f92750f]::ScopedKey<rustc_span[8c8cff5746e8a1c7]::SessionGlobals>>::set::<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  49:     0x7fbc94698526 - std[546c48fd97b1d9d5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>
  50:     0x7fbc94c6f9ae - <<std[546c48fd97b1d9d5]::thread::Builder>::spawn_unchecked_<rustc_interface[b5a070060ba77ac7]::util::run_in_thread_pool_with_globals<rustc_interface[b5a070060ba77ac7]::interface::run_compiler<core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>, rustc_driver_impl[9b4d7c25c63e73b3]::run_compiler::{closure#1}>::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f83c350bdee9593e]::result::Result<(), rustc_span[8c8cff5746e8a1c7]::ErrorGuaranteed>>::{closure#1} as core[f83c350bdee9593e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  51:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4b035f338583a276
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  52:     0x7fbc92175695 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha82e570518d356ed
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/alloc/src/boxed.rs:2010:9
  53:     0x7fbc92175695 - std::sys::unix::thread::Thread::new::thread_start::h3656904c32ed5a49
                               at /rustc/330727467b8fdf2c43b95095a0efae7012c4f83b/library/std/src/sys/unix/thread.rs:108:17
  54:     0x7fbc91f0d44b - <unknown>
  55:     0x7fbc91f90e40 - <unknown>
  56:                0x0 - <unknown>

error: 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.72.0-nightly (330727467 2023-06-29) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z treat-err-as-bug=3

query stack during panic:
#0 [mir_borrowck] borrow-checking `connect`
#1 [type_of] computing type of `connect::{opaque#0}`
#2 [check_mod_item_types] checking item types in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
thread caused non-unwinding panic. aborting.
[1]    3780838 IOT instruction  rustc /home/matthias/vcs/github/rust/tests/ui/async-await/issue-74047.rs
```

</p>
</details>