Repository: rust
Issue: ICE: `None` in `compiler/rustc_mir_build/src/build/matches/mod.rs`
Labels: I-ICE,T-compiler,C-bug,S-bug-has-test

<!--
[31mICE[0m: Rustc ./ice.rs '--edition=2021 -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' panicked at compiler/rustc_mir_build/src/build/expr/as_place.rs:253:31: 'called `Option::unwrap()` on a `None` value'', 'thread 'rustc' panicked at compiler/rustc_mir_build/src/build/expr/as_place.rs:253:31: 'called `Option::unwrap()` on a `None` value''
File: /tmp/ices/ice.rs
-->

snippet:
````rust
fn enum_upvar() {
    type T = impl Copy;
    let foo: T = Some((1u32, 2u32));
    let x = move || {
        match foo {
            None => (),
            Some(yield) => (),
        }
    };
}


````

Version information
````
rustc 1.77.0-nightly (ae9d24de8 2024-01-09)
binary: rustc
commit-hash: ae9d24de80b00b4158d1a29a212a6b02aeda0e75
commit-date: 2024-01-09
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

````

Command:
`/home/matthias/.rustup/toolchains/master/bin/rustc --edition=2021`

<!--
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>Program output</strong></summary>
<p>

```
error: expected identifier, found reserved keyword `yield`
 --> /tmp/icemaker_global_tempdir.x6UZht6u4SjU/rustc_testrunner_tmpdir_reporting.JA7y372p2elJ/mvce.rs:7:18
  |
7 |             Some(yield) => (),
  |                  ^^^^^ expected identifier, found reserved keyword
  |
help: escape `yield` to use it as an identifier
  |
7 |             Some(r#yield) => (),
  |                  ++

error[E0658]: `impl Trait` in type aliases is unstable
 --> /tmp/icemaker_global_tempdir.x6UZht6u4SjU/rustc_testrunner_tmpdir_reporting.JA7y372p2elJ/mvce.rs:2:14
  |
2 |     type T = impl Copy;
  |              ^^^^^^^^^
  |
  = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
  = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `mvce`
  --> /tmp/icemaker_global_tempdir.x6UZht6u4SjU/rustc_testrunner_tmpdir_reporting.JA7y372p2elJ/mvce.rs:10:2
   |
10 | }
   |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.x6UZht6u4SjU/rustc_testrunner_tmpdir_reporting.JA7y372p2elJ/mvce.rs`

warning: unused variable: `x`
 --> /tmp/icemaker_global_tempdir.x6UZht6u4SjU/rustc_testrunner_tmpdir_reporting.JA7y372p2elJ/mvce.rs:4:9
  |
4 |     let x = move || {
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

thread 'rustc' panicked at compiler/rustc_mir_build/src/build/expr/as_place.rs:253:31:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7f3a2358c7e6 - std::backtrace_rs::backtrace::libunwind::trace::h5bb3bcbd9bf843dc
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f3a2358c7e6 - std::backtrace_rs::backtrace::trace_unsynchronized::h2be7c62a2fc2f0ae
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3a2358c7e6 - std::sys_common::backtrace::_print_fmt::h0eb797837574729c
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f3a2358c7e6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9cfb89fe3b10d684
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f3a235deed0 - core::fmt::rt::Argument::fmt::h05c1336e950869a8
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/core/src/fmt/rt.rs:142:9
   5:     0x7f3a235deed0 - core::fmt::write::hf9ed93bf0be8a0ba
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f3a2358014f - std::io::Write::write_fmt::h575af11d100da1a8
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/io/mod.rs:1810:15
   7:     0x7f3a2358c5c4 - std::sys_common::backtrace::_print::h4efb82e5b25d472e
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f3a2358c5c4 - std::sys_common::backtrace::print::h6788dd5df6617703
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f3a2358f357 - std::panicking::default_hook::{{closure}}::hfa58db406ef5c661
  10:     0x7f3a2358f0b9 - std::panicking::default_hook::h60a66ef279ae47ef
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/panicking.rs:292:9
  11:     0x7f3a2635c9bc - std[6b9fb5ba93d727e9]::panicking::update_hook::<alloc[30b92f95685fae2c]::boxed::Box<rustc_driver_impl[54e7dbd11c712533]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f3a2358faa6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h37eedb2cb21c4dfc
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/alloc/src/boxed.rs:2030:9
  13:     0x7f3a2358faa6 - std::panicking::rust_panic_with_hook::hbea871998462fd45
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/panicking.rs:785:13
  14:     0x7f3a2358f7b9 - std::panicking::begin_panic_handler::{{closure}}::h45ad8d6a57ea4023
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/panicking.rs:651:13
  15:     0x7f3a2358cce6 - std::sys_common::backtrace::__rust_end_short_backtrace::h6e4a62ed56190aa9
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f3a2358f550 - rust_begin_unwind
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/panicking.rs:647:5
  17:     0x7f3a235db5d5 - core::panicking::panic_fmt::hfc52fd0216040145
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/core/src/panicking.rs:72:14
  18:     0x7f3a235db693 - core::panicking::panic::h37bd7f6a16f3c553
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/core/src/panicking.rs:144:5
  19:     0x7f3a2802fef5 - <rustc_mir_build[a392e445574d452]::build::Builder>::match_simplified_candidates
  20:     0x7f3a27b0f562 - <rustc_mir_build[a392e445574d452]::build::Builder>::lower_match_tree
  21:     0x7f3a27fbb5c1 - <rustc_mir_build[a392e445574d452]::build::Builder>::match_expr
  22:     0x7f3a27b06905 - <rustc_mir_build[a392e445574d452]::build::Builder>::expr_into_dest
  23:     0x7f3a27b06d05 - <rustc_mir_build[a392e445574d452]::build::Builder>::expr_into_dest
  24:     0x7f3a249a92dd - <rustc_mir_build[a392e445574d452]::build::Builder>::ast_block_stmts
  25:     0x7f3a27b05ca3 - <rustc_mir_build[a392e445574d452]::build::Builder>::expr_into_dest
  26:     0x7f3a27b06d05 - <rustc_mir_build[a392e445574d452]::build::Builder>::expr_into_dest
  27:     0x7f3a27dfe87e - rustc_mir_build[a392e445574d452]::build::mir_build::{closure#0}
  28:     0x7f3a27b019b0 - rustc_mir_build[a392e445574d452]::build::mir_built
  29:     0x7f3a27b01633 - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  30:     0x7f3a27affd39 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  31:     0x7f3a27aff910 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  32:     0x7f3a27732b30 - rustc_mir_transform[a66e1bf0036969f9]::ffi_unwind_calls::has_ffi_unwind_calls
  33:     0x7f3a2773269d - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>
  34:     0x7f3a27a51007 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  35:     0x7f3a27a50c03 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  36:     0x7f3a27a02c83 - rustc_mir_transform[a66e1bf0036969f9]::mir_const
  37:     0x7f3a27a02baf - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_const::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  38:     0x7f3a27affd39 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  39:     0x7f3a27aff850 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_const::get_query_non_incr::__rust_end_short_backtrace
  40:     0x7f3a2587a5e2 - rustc_mir_transform[a66e1bf0036969f9]::mir_promoted
  41:     0x7f3a27b732e0 - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 16usize]>>
  42:     0x7f3a27b735aa - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  43:     0x7f3a284e3853 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7f3a284e3970 - rustc_borrowck[df3a95fa1272e840]::mir_borrowck
  45:     0x7f3a284e3899 - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  46:     0x7f3a27affd39 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  47:     0x7f3a27aff794 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  48:     0x7f3a281f3fc9 - <rustc_borrowck[df3a95fa1272e840]::type_check::TypeChecker>::prove_closure_bounds
  49:     0x7f3a284a10ae - <rustc_borrowck[df3a95fa1272e840]::type_check::TypeChecker>::typeck_mir
  50:     0x7f3a252e86d1 - rustc_borrowck[df3a95fa1272e840]::type_check::type_check
  51:     0x7f3a252ccc09 - rustc_borrowck[df3a95fa1272e840]::nll::compute_regions
  52:     0x7f3a284f3b97 - rustc_borrowck[df3a95fa1272e840]::do_mir_borrowck
  53:     0x7f3a284e3e51 - rustc_borrowck[df3a95fa1272e840]::mir_borrowck
  54:     0x7f3a284e3899 - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  55:     0x7f3a27affd39 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  56:     0x7f3a27aff794 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  57:     0x7f3a28ad1259 - rustc_middle[d060b801b30d0b16]::query::plumbing::query_get_at::<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_span[79961d1f3d44db5f]::def_id::LocalDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>>.llvm.9191639156879714653.cold.0
  58:     0x7f3a2649dfbd - <rustc_hir_analysis[c481e10dc51c4446]::collect::type_of::opaque::TaitConstraintLocator>::check
  59:     0x7f3a2648bf20 - <rustc_hir_analysis[c481e10dc51c4446]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[a3b1848d05e218a2]::intravisit::Visitor>::visit_item
  60:     0x7f3a286098fc - rustc_hir_analysis[c481e10dc51c4446]::collect::type_of::type_of_opaque
  61:     0x7f3a28608e5b - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  62:     0x7f3a2765ef54 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::DefaultCache<rustc_span[79961d1f3d44db5f]::def_id::DefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  63:     0x7f3a2864321e - rustc_query_impl[aafdc9ab48500bbf]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  64:     0x7f3a2765dbae - rustc_middle[d060b801b30d0b16]::query::plumbing::query_get_at::<rustc_query_system[5609ae2ca0b8284d]::query::caches::DefaultCache<rustc_span[79961d1f3d44db5f]::def_id::DefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>>
  65:     0x7f3a258a3678 - rustc_hir_analysis[c481e10dc51c4446]::collect::type_of::type_of
  66:     0x7f3a276600be - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>
  67:     0x7f3a2765ef54 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::DefaultCache<rustc_span[79961d1f3d44db5f]::def_id::DefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  68:     0x7f3a2765eb1d - rustc_query_impl[aafdc9ab48500bbf]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  69:     0x7f3a2765dbae - rustc_middle[d060b801b30d0b16]::query::plumbing::query_get_at::<rustc_query_system[5609ae2ca0b8284d]::query::caches::DefaultCache<rustc_span[79961d1f3d44db5f]::def_id::DefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 8usize]>>>
  70:     0x7f3a28144033 - rustc_hir_analysis[c481e10dc51c4446]::check::check::check_item_type
  71:     0x7f3a27d9d0d9 - rustc_hir_analysis[c481e10dc51c4446]::check::wfcheck::check_well_formed
  72:     0x7f3a27d9bf73 - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>
  73:     0x7f3a27d9b671 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::VecCache<rustc_hir[a3b1848d05e218a2]::hir_id::OwnerId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  74:     0x7f3a27d9b3db - rustc_query_impl[aafdc9ab48500bbf]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  75:     0x7f3a27d98d77 - rustc_hir_analysis[c481e10dc51c4446]::check::wfcheck::check_mod_type_wf
  76:     0x7f3a27d98cbb - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>
  77:     0x7f3a27d97e7b - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::DefaultCache<rustc_span[79961d1f3d44db5f]::def_id::LocalModDefId, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  78:     0x7f3a27d97c09 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  79:     0x7f3a27d97b1a - <rustc_middle[d060b801b30d0b16]::hir::map::Map>::try_par_for_each_module::<rustc_hir_analysis[c481e10dc51c4446]::check_crate::{closure#4}::{closure#0}>::{closure#0}
  80:     0x7f3a27afd9dc - rustc_hir_analysis[c481e10dc51c4446]::check_crate
  81:     0x7f3a28037559 - rustc_interface[82b52b903971ad5b]::passes::analysis
  82:     0x7f3a2803719f - rustc_query_impl[aafdc9ab48500bbf]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[aafdc9ab48500bbf]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>
  83:     0x7f3a285c3824 - rustc_query_system[5609ae2ca0b8284d]::query::plumbing::try_execute_query::<rustc_query_impl[aafdc9ab48500bbf]::DynamicConfig<rustc_query_system[5609ae2ca0b8284d]::query::caches::SingleCache<rustc_middle[d060b801b30d0b16]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[aafdc9ab48500bbf]::plumbing::QueryCtxt, false>
  84:     0x7f3a285c3615 - rustc_query_impl[aafdc9ab48500bbf]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  85:     0x7f3a2835d708 - rustc_interface[82b52b903971ad5b]::interface::run_compiler::<core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>, rustc_driver_impl[54e7dbd11c712533]::run_compiler::{closure#0}>::{closure#0}
  86:     0x7f3a285e8fc6 - std[6b9fb5ba93d727e9]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[82b52b903971ad5b]::util::run_in_thread_with_globals<rustc_interface[82b52b903971ad5b]::util::run_in_thread_pool_with_globals<rustc_interface[82b52b903971ad5b]::interface::run_compiler<core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>, rustc_driver_impl[54e7dbd11c712533]::run_compiler::{closure#0}>::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>
  87:     0x7f3a285e8df3 - <<std[6b9fb5ba93d727e9]::thread::Builder>::spawn_unchecked_<rustc_interface[82b52b903971ad5b]::util::run_in_thread_with_globals<rustc_interface[82b52b903971ad5b]::util::run_in_thread_pool_with_globals<rustc_interface[82b52b903971ad5b]::interface::run_compiler<core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>, rustc_driver_impl[54e7dbd11c712533]::run_compiler::{closure#0}>::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ea75208d289faa44]::result::Result<(), rustc_span[79961d1f3d44db5f]::ErrorGuaranteed>>::{closure#1} as core[ea75208d289faa44]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  88:     0x7f3a235999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h646d8cfdd583ca20
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/alloc/src/boxed.rs:2016:9
  89:     0x7f3a235999d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h79a5366d4b935d3e
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/alloc/src/boxed.rs:2016:9
  90:     0x7f3a235999d5 - std::sys::unix::thread::Thread::new::thread_start::h1e5e13c4b7d7a988
                               at /rustc/ae9d24de80b00b4158d1a29a212a6b02aeda0e75/library/std/src/sys/unix/thread.rs:108:17
  91:     0x7f3a233859eb - <unknown>
  92:     0x7f3a234097cc - <unknown>
  93:                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.77.0-nightly (ae9d24de8 2024-01-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z dump-mir-dir=dir

query stack during panic:
#0 [mir_built] building MIR for `enum_upvar::{closure#0}`
#1 [has_ffi_unwind_calls] checking if `enum_upvar::{closure#0}` contains FFI-unwind calls
#2 [mir_const] preparing `enum_upvar::{closure#0}` for borrow checking
#3 [mir_promoted] promoting constants in MIR for `enum_upvar::{closure#0}`
#4 [mir_borrowck] borrow-checking `enum_upvar::{closure#0}`
#5 [mir_borrowck] borrow-checking `enum_upvar`
#6 [type_of_opaque] computing type of opaque `enum_upvar::T::{opaque#0}`
#7 [type_of] computing type of `enum_upvar::T::{opaque#0}`
#8 [check_well_formed] checking that `enum_upvar::T::{opaque#0}` is well-formed
#9 [check_mod_type_wf] checking that types are well-formed in top-level module
#10 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors; 1 warning emitted

Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.

```

</p>
</details>

<!--
query stack:
#0 [mir_built] building MIR for `enum_upvar::{closure#0}`
#1 [has_ffi_unwind_calls] checking if `enum_upvar::{closure#0}` contains FFI-unwind calls
#2 [mir_const] preparing `enum_upvar::{closure#0}` for borrow checking
#3 [mir_promoted] promoting constants in MIR for `enum_upvar::{closure#0}`
#4 [mir_borrowck] borrow-checking `enum_upvar::{closure#0}`
#5 [mir_borrowck] borrow-checking `enum_upvar`
#6 [type_of_opaque] computing type of opaque `enum_upvar::T::{opaque#0}`
#7 [type_of] computing type of `enum_upvar::T::{opaque#0}`
#8 [check_well_formed] checking that `enum_upvar::T::{opaque#0}` is well-formed
#9 [check_mod_type_wf] checking that types are well-formed in top-level module
#10 [analysis] running analysis passes on this crate

-->