Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: {OpaqueTypeKey { def_id: DefId .. #123157

Open
matthiaskrgr opened this issue Mar 28, 2024 · 2 comments
Open

ICE: {OpaqueTypeKey { def_id: DefId .. #123157

matthiaskrgr opened this issue Mar 28, 2024 · 2 comments
Assignees
Labels
C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

code:

#![feature(type_alias_impl_trait)]

#[derive(Copy, Clone)]
struct Foo((u32, u32));

fn main() {
    type T = impl Copy;
    let foo: T = Foo((1u32, 2u32));
    let x = move || {
        let x = move || {
        let Foo((a, b)) = foo;
    };
    };
}

Version information

rustc 1.79.0-nightly (463a11bef 2024-03-28)
binary: rustc
commit-hash: 463a11bef4d6378439afebf2a9543aef36ccf2c1
commit-date: 2024-03-28
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.2

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc --edition=2021

Program output

warning: unused variable: `x`
  --> 8C6E9F300DC05B0119EFD44A9B65DCB8844EF8D4829A527B3FE069E16DF441EF.rs:10:9
   |
10 |     let x = move || {
   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `x`
  --> 8C6E9F300DC05B0119EFD44A9B65DCB8844EF8D4829A527B3FE069E16DF441EF.rs:11:13
   |
11 |         let x = move || {
   |             ^ help: if this is intentional, prefix it with an underscore: `_x`
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:     0x79d5135622a5 - std::backtrace_rs::backtrace::libunwind::trace::h7884d067d1055777
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x79d5135622a5 - std::backtrace_rs::backtrace::trace_unsynchronized::h6bc4d647cdcfd833
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x79d5135622a5 - std::sys_common::backtrace::_print_fmt::hde15b23869dacdeb
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x79d5135622a5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a7c8ebfe0e5a9ea
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x79d5135b364b - core::fmt::rt::Argument::fmt::h12ee69ff17c60b9e
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/fmt/rt.rs:142:9
   5:     0x79d5135b364b - core::fmt::write::hafeb62294a20d279
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/fmt/mod.rs:1153:17
   6:     0x79d513556e8f - std::io::Write::write_fmt::h83162bfc67f19d63
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/io/mod.rs:1843:15
   7:     0x79d51356207e - std::sys_common::backtrace::_print::hd55ca7a5e2e3de7e
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x79d51356207e - std::sys_common::backtrace::print::he94870e87e3768e8
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x79d513564d29 - std::panicking::default_hook::{{closure}}::hd193b85d1d659c30
  10:     0x79d513564a93 - std::panicking::default_hook::h6de7d4d748c8b263
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:292:9
  11:     0x79d50fdf741f - std[bbe84908ccbe1712]::panicking::update_hook::<alloc[e8addd69f5f9766a]::boxed::Box<rustc_driver_impl[4a5ef0c71571037d]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x79d51356542c - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h98893e692c20b532
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2032:9
  13:     0x79d51356542c - std::panicking::rust_panic_with_hook::ha4c10d4e371025d4
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:793:13
  14:     0x79d51356519d - std::panicking::begin_panic_handler::{{closure}}::h8d8b80cfb6d2af9a
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:650:13
  15:     0x79d513562769 - std::sys_common::backtrace::__rust_end_short_backtrace::hedf50fb5defff019
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x79d513564f07 - rust_begin_unwind
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/panicking.rs:646:5
  17:     0x79d5135afae6 - core::panicking::panic_fmt::hde3e2c796a3a5416
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:72:14
  18:     0x79d5135afb8f - core::panicking::panic::h150613825d1ad83d
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/panicking.rs:141:5
  19:     0x79d5135af869 - core::option::unwrap_failed::h83da879f26f94880
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/option.rs:1984:5
  20:     0x79d511600ea8 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  21:     0x79d5115fd18e - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  22:     0x79d5115f16ba - <rustc_mir_build[81985b26f8ff446]::build::Builder>::as_temp::{closure#0}
  23:     0x79d5115f6714 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_as_place
  24:     0x79d5115f75ad - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_as_place
  25:     0x79d5115f75ad - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_as_place
  26:     0x79d5115ecfac - <rustc_mir_build[81985b26f8ff446]::build::Builder>::as_rvalue
  27:     0x79d5115f955c - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  28:     0x79d5115fb4f6 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  29:     0x79d50e2a8c18 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::ast_block_stmts
  30:     0x79d5115fa347 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  31:     0x79d5115fb4f6 - <rustc_mir_build[81985b26f8ff446]::build::Builder>::expr_into_dest
  32:     0x79d5115c0c6a - rustc_mir_build[81985b26f8ff446]::build::mir_build::{closure#0}
  33:     0x79d5115bcacf - rustc_mir_build[81985b26f8ff446]::build::mir_build
  34:     0x79d5115bbda8 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::mir_built::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>
  35:     0x79d5113e06f1 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  36:     0x79d5113e02cc - rustc_query_impl[2599229a2d608fd]::query_impl::mir_built::get_query_non_incr::__rust_end_short_backtrace
  37:     0x79d511941908 - rustc_mir_transform[9bd419f3396e628a]::ffi_unwind_calls::has_ffi_unwind_calls
  38:     0x79d511941417 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::has_ffi_unwind_calls::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>
  39:     0x79d511940b7e - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  40:     0x79d51194077f - rustc_query_impl[2599229a2d608fd]::query_impl::has_ffi_unwind_calls::get_query_non_incr::__rust_end_short_backtrace
  41:     0x79d50ed211e3 - rustc_mir_transform[9bd419f3396e628a]::mir_promoted
  42:     0x79d511503b9a - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::mir_promoted::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 16usize]>>
  43:     0x79d511503e5b - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  44:     0x79d511503aa3 - rustc_query_impl[2599229a2d608fd]::query_impl::mir_promoted::get_query_non_incr::__rust_end_short_backtrace
  45:     0x79d5113de850 - rustc_borrowck[734a863cae5ae9c]::mir_borrowck
  46:     0x79d5113de797 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>
  47:     0x79d5113e06f1 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  48:     0x79d5113e020c - rustc_query_impl[2599229a2d608fd]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  49:     0x79d511c2769c - rustc_middle[dd9835c0f7faa91c]::query::plumbing::query_get_at::<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>>
  50:     0x79d511c2770e - <rustc_borrowck[734a863cae5ae9c]::type_check::TypeChecker>::prove_closure_bounds
  51:     0x79d5116d8e55 - <rustc_borrowck[734a863cae5ae9c]::type_check::TypeChecker>::typeck_mir
  52:     0x79d50e8e0e63 - rustc_borrowck[734a863cae5ae9c]::type_check::type_check
  53:     0x79d50e91ac0a - rustc_borrowck[734a863cae5ae9c]::nll::compute_regions
  54:     0x79d5121fd925 - rustc_borrowck[734a863cae5ae9c]::do_mir_borrowck
  55:     0x79d5113deca8 - rustc_borrowck[734a863cae5ae9c]::mir_borrowck
  56:     0x79d5113de797 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>
  57:     0x79d5113e06f1 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  58:     0x79d5113e020c - rustc_query_impl[2599229a2d608fd]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  59:     0x79d51186236f - rustc_middle[dd9835c0f7faa91c]::query::plumbing::query_get_at::<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>>
  60:     0x79d50ff3c386 - <rustc_hir_analysis[6376f4166c2cb7c6]::collect::type_of::opaque::TaitConstraintLocator>::check
  61:     0x79d50ff2df52 - <rustc_hir_analysis[6376f4166c2cb7c6]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[ce6c89b18b0ff310]::intravisit::Visitor>::visit_item
  62:     0x79d51200e9f0 - rustc_hir_analysis[6376f4166c2cb7c6]::collect::type_of::type_of_opaque
  63:     0x79d51200e1d3 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>
  64:     0x79d5113c6fde - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::DefIdCache<rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  65:     0x79d5121cba9e - rustc_query_impl[2599229a2d608fd]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  66:     0x79d511864bd6 - rustc_middle[dd9835c0f7faa91c]::query::plumbing::query_get_at::<rustc_query_system[b3fe5c7fa928b55c]::query::caches::DefIdCache<rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>>
  67:     0x79d50ee4bb4c - rustc_hir_analysis[6376f4166c2cb7c6]::collect::type_of::type_of
  68:     0x79d5113c83a2 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>
  69:     0x79d5113c6fde - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::DefIdCache<rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  70:     0x79d5113c6adb - rustc_query_impl[2599229a2d608fd]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  71:     0x79d511864bd6 - rustc_middle[dd9835c0f7faa91c]::query::plumbing::query_get_at::<rustc_query_system[b3fe5c7fa928b55c]::query::caches::DefIdCache<rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 8usize]>>>
  72:     0x79d51216c641 - rustc_hir_analysis[6376f4166c2cb7c6]::check::check::check_item_type
  73:     0x79d511878712 - rustc_hir_analysis[6376f4166c2cb7c6]::check::wfcheck::check_well_formed
  74:     0x79d5118771eb - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>
  75:     0x79d511876980 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::VecCache<rustc_hir[ce6c89b18b0ff310]::hir_id::OwnerId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  76:     0x79d5118766ff - rustc_query_impl[2599229a2d608fd]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  77:     0x79d51187463a - rustc_hir_analysis[6376f4166c2cb7c6]::check::wfcheck::check_mod_type_wf
  78:     0x79d511874461 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>
  79:     0x79d511c9d870 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::DefaultCache<rustc_span[8fc22c8c557be2fa]::def_id::LocalModDefId, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  80:     0x79d511c9d61b - rustc_query_impl[2599229a2d608fd]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  81:     0x79d5113dadfb - rustc_hir_analysis[6376f4166c2cb7c6]::check_crate
  82:     0x79d511748e2a - rustc_interface[f35796931ff6d62f]::passes::analysis
  83:     0x79d511748993 - rustc_query_impl[2599229a2d608fd]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2599229a2d608fd]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>
  84:     0x79d512000525 - rustc_query_system[b3fe5c7fa928b55c]::query::plumbing::try_execute_query::<rustc_query_impl[2599229a2d608fd]::DynamicConfig<rustc_query_system[b3fe5c7fa928b55c]::query::caches::SingleCache<rustc_middle[dd9835c0f7faa91c]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2599229a2d608fd]::plumbing::QueryCtxt, false>
  85:     0x79d512000289 - rustc_query_impl[2599229a2d608fd]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  86:     0x79d511ea2885 - rustc_interface[f35796931ff6d62f]::interface::run_compiler::<core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>, rustc_driver_impl[4a5ef0c71571037d]::run_compiler::{closure#0}>::{closure#0}
  87:     0x79d511f71845 - std[bbe84908ccbe1712]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f35796931ff6d62f]::util::run_in_thread_with_globals<rustc_interface[f35796931ff6d62f]::util::run_in_thread_pool_with_globals<rustc_interface[f35796931ff6d62f]::interface::run_compiler<core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>, rustc_driver_impl[4a5ef0c71571037d]::run_compiler::{closure#0}>::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>
  88:     0x79d511f71672 - <<std[bbe84908ccbe1712]::thread::Builder>::spawn_unchecked_<rustc_interface[f35796931ff6d62f]::util::run_in_thread_with_globals<rustc_interface[f35796931ff6d62f]::util::run_in_thread_pool_with_globals<rustc_interface[f35796931ff6d62f]::interface::run_compiler<core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>, rustc_driver_impl[4a5ef0c71571037d]::run_compiler::{closure#0}>::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e11ba6fe20ece5aa]::result::Result<(), rustc_span[8fc22c8c557be2fa]::ErrorGuaranteed>>::{closure#1} as core[e11ba6fe20ece5aa]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  89:     0x79d51356ed89 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7ab391504a3969f1
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2018:9
  90:     0x79d51356ed89 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h39323d8edfd154a5
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2018:9
  91:     0x79d51356ed89 - std::sys::pal::unix::thread::Thread::new::thread_start::h2dd21aff3b4d0913
                               at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys/pal/unix/thread.rs:108:17
  92:     0x79d51330e55a - <unknown>
  93:     0x79d51338ba3c - <unknown>
  94:                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: please attach the file at `/tmp/im/o/rustc-ice-2024-03-28T07_03_39-136795.txt` to your bug report

query stack during panic:
#0 [mir_built] building MIR for `main::{closure#0}`
#1 [has_ffi_unwind_calls] checking if `main::{closure#0}` contains FFI-unwind calls
#2 [mir_promoted] promoting constants in MIR for `main::{closure#0}`
#3 [mir_borrowck] borrow-checking `main::{closure#0}`
#4 [mir_borrowck] borrow-checking `main`
#5 [type_of_opaque] computing type of opaque `main::T::{opaque#0}`
#6 [type_of] computing type of `main::T::{opaque#0}`
#7 [check_well_formed] checking that `main::T::{opaque#0}` is well-formed
#8 [check_mod_type_wf] checking that types are well-formed in top-level module
#9 [analysis] running analysis passes on this crate
end of query stack
warning: 2 warnings emitted

note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:13 ~ 8C6E9F300DC05B0119EFD44A9B65DCB8844EF8D4829A527B3FE069E16DF441EF[8eeb]::main::T::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: 8C6E9F300DC05B0119EFD44A9B65DCB8844EF8D4829A527B3FE069E16DF441EF.rs:10:13: 14:6 (#0), ty: Foo } }}
  |
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:43:43
             0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
             1: <rustc_errors::DiagCtxt>::emit_diagnostic
             2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
             3: core::ptr::drop_in_place::<rustc_infer::infer::InferCtxt>
             4: rustc_borrowck::mir_borrowck
             5: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
             6: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
             7: rustc_query_impl::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
             8: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
             9: <rustc_hir_analysis::collect::type_of::opaque::TaitConstraintLocator>::check
            10: <rustc_hir_analysis::collect::type_of::opaque::TaitConstraintLocator as rustc_hir::intravisit::Visitor>::visit_item
            11: rustc_hir_analysis::collect::type_of::type_of_opaque
            12: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            13: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            14: rustc_query_impl::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
            15: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            16: rustc_hir_analysis::collect::type_of::type_of
            17: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
            18: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            19: rustc_query_impl::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
            20: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
            21: rustc_hir_analysis::check::check::check_item_type
            22: rustc_hir_analysis::check::wfcheck::check_well_formed
            23: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            24: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_hir::hir_id::OwnerId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            25: rustc_query_impl::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
            26: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
            27: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            28: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::LocalModDefId, rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            29: rustc_query_impl::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
            30: rustc_hir_analysis::check_crate
            31: rustc_interface::passes::analysis
            32: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            33: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
            34: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
            35: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
            36: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            37: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            38: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2018:9
            39: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/alloc/src/boxed.rs:2018:9
            40: std::sys::pal::unix::thread::Thread::new::thread_start
                       at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/std/src/sys/pal/unix/thread.rs:108:17
            41: <unknown>
            42: <unknown>


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: please attach the file at `/tmp/im/o/rustc-ice-2024-03-28T07_03_39-136795.txt` to your bug report

query stack during panic:
end of query stack
thread 'rustc' panicked at library/core/src/panicking.rs:160:5:
panic in a destructor during cleanup

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: please attach the file at `/tmp/im/o/rustc-ice-2024-03-28T07_03_39-136795.txt` to your bug report

query stack during panic:
end of query stack
thread caused non-unwinding panic. aborting.
[1]    136795 IOT instruction  rustc 8C6E9F300DC05B0119EFD44A9B65DCB8844EF8D4829A527B3FE069E16DF441EF.rs

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 28, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 28, 2024
@matthiaskrgr
Copy link
Member Author

Regression in nightly-2022-03-31
fetching (via remote github) commits from max(9c06e1b, 2022-03-28) to c5cf08d
ending github query because we found starting sha: 9c06e1b
get_commits_between returning commits, len: 8
commit[0] 2022-03-29: Auto merge of #95448 - Dylan-DPC:rollup-wpj5yto, r=Dylan-DPC
commit[1] 2022-03-30: Auto merge of #95455 - RalfJung:miri, r=RalfJung
commit[2] 2022-03-30: Auto merge of #94081 - oli-obk:lazy_tait_take_two, r=nikomatsakis
commit[3] 2022-03-30: Auto merge of #95466 - Dylan-DPC:rollup-g7ddr8y, r=Dylan-DPC
commit[4] 2022-03-30: Auto merge of #95241 - Gankra:cleaned-provenance, r=workingjubilee
commit[5] 2022-03-30: Auto merge of #94963 - lcnr:inherent-impls-std, r=oli-obk,m-ou-se
commit[6] 2022-03-30: Auto merge of #95458 - calebcartwright:sync-rustfmt-subtree, r=calebcartwright
commit[7] 2022-03-30: Auto merge of #95425 - nnethercote:yet-more-parse_tt-improvements, r=petrochenkov
ERROR: no CI builds available between 9c06e1b and c5cf08d within last 167 days

could be #94081 ? cc @oli-obk

@jieyouxu jieyouxu added F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 28, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Mar 29, 2024

Definitely. This should have been fixed by PlaceElem::OpaqueType, but apparently I missed something

@oli-obk oli-obk self-assigned this Mar 29, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants