Skip to content

ICE: None in opaque types region infer #124021

New issue

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

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

Already on GitHub? # to your account

Closed
matthiaskrgr opened this issue Apr 16, 2024 · 1 comment · Fixed by #133961
Closed

ICE: None in opaque types region infer #124021

matthiaskrgr opened this issue Apr 16, 2024 · 1 comment · Fixed by #133961
Labels
C-bug Category: This is a bug. 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

type Opaque2<'a> = impl Sized + 'a;

fn test2() -> impl for<'a, 'b> Fn((&'a str, &'b str)) -> (Opaque2<'a>, Opaque2<'a>) {
    |x| x
}
original code

original:

#![feature(type_alias_impl_trait)]

fn id(s: &str) -> &str {
    s
}

type Opaque<'a> = impl Sized + 'a;

fn test(test: &str) -> (impl Fn(&str) -> Opaque2<'_>, impl Fn(&str) -> Opaque4<'_>) {
    (id, id) //~ ERROR expected generic lifetime parameter, found `'_`
}

fn id2<'a, 'b>(s: (&'a str, &'b str)) -> (&'a str, &'b str) {
    s
}

type Opaque2<'a> = impl Sized + 'a;

fn test2() -> impl for<'a, 'b> Fn((&'a str, &'b str)) -> (Opaque2<'a>, Opaque2<'a>) {
    |x| x //~ ERROR expected generic lifetime parameter, found `'a`
}

type Opaque3<'a> = impl Sized + 'a;

fn test3(s: &str) -> (impl Fn(&str) -> Sized<'_>, Opaque3<'_>) {
    (id, s) //~ ERROR expected generic lifetime parameter, found `'_`
}

type Opaque4<'a> = impl Opaque3 + 'b;
fn test4(s: &str) -> (Opaque4<'_>, impl Fn(&str) -> Opaque4<'_>) {
    (s, id) //~ ERROR expected generic lifetime parameter, found `'_`
}

type Inner<'a> = impl Sized;
fn outer_impl() -> impl for<'a> Fn(&'a ()) -> Inner<'a> {
    |x| x //~ ERROR expected generic lifetime parameter, found `'a`
}

fn main() {}

Version information

rustc 1.79.0-nightly (63f70b3d1 2024-04-16)
binary: rustc
commit-hash: 63f70b3d104e20289a1a0df82747066c3d85b9a1
commit-date: 2024-04-16
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.3

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

error[E0658]: `impl Trait` in type aliases is unstable
 --> /tmp/icemaker_global_tempdir.uKAxijQMaRaP/rustc_testrunner_tmpdir_reporting.zkjOGI5OuKUN/mvce.rs:1:20
  |
1 | type Opaque2<'a> = impl Sized + 'a;
  |                    ^^^^^^^^^^^^^^^
  |
  = 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
  = note: this compiler was built on 2024-04-16; consider upgrading it if it is out of date

error[E0601]: `main` function not found in crate `mvce`
 --> /tmp/icemaker_global_tempdir.uKAxijQMaRaP/rustc_testrunner_tmpdir_reporting.zkjOGI5OuKUN/mvce.rs:5:2
  |
5 | }
  |  ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.uKAxijQMaRaP/rustc_testrunner_tmpdir_reporting.zkjOGI5OuKUN/mvce.rs`

thread 'rustc' panicked at compiler/rustc_borrowck/src/region_infer/opaque_types.rs:105:74:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:     0x7003f3096cd5 - std::backtrace_rs::backtrace::libunwind::trace::hdd748c7838285883
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7003f3096cd5 - std::backtrace_rs::backtrace::trace_unsynchronized::ha1462979ee6a2e4a
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7003f3096cd5 - std::sys_common::backtrace::_print_fmt::h423f6c0147b1e726
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7003f3096cd5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8781c340849a7502
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7003f30e5f9b - core::fmt::rt::Argument::fmt::he5b1af0e8d850256
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/core/src/fmt/rt.rs:165:63
   5:     0x7003f30e5f9b - core::fmt::write::hcd3c5ccee382395a
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/core/src/fmt/mod.rs:1157:21
   6:     0x7003f308b85f - std::io::Write::write_fmt::h7d1e4c46a9034f24
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/io/mod.rs:1832:15
   7:     0x7003f3096aae - std::sys_common::backtrace::_print::he7fe8e3f6f78aca7
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7003f3096aae - std::sys_common::backtrace::print::h3ca58da6c9bbfe9e
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7003f3099429 - std::panicking::default_hook::{{closure}}::h04ae4afc91fb7ed6
  10:     0x7003f309916d - std::panicking::default_hook::hb7ac4e3868494960
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/panicking.rs:291:9
  11:     0x7003efa7b1cb - std[cc9b189ccd9d9748]::panicking::update_hook::<alloc[cf0b8628080ef300]::boxed::Box<rustc_driver_impl[e492dcc29030f304]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7003f3099b2c - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1bda734d4b3a4644
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/alloc/src/boxed.rs:2032:9
  13:     0x7003f3099b2c - std::panicking::rust_panic_with_hook::hd0146bfa2503919c
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/panicking.rs:792:13
  14:     0x7003f309989d - std::panicking::begin_panic_handler::{{closure}}::hd32f7e647243a109
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/panicking.rs:649:13
  15:     0x7003f3097199 - std::sys_common::backtrace::__rust_end_short_backtrace::h14d8021dc65165b8
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7003f3099607 - rust_begin_unwind
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/panicking.rs:645:5
  17:     0x7003f30e2446 - core::panicking::panic_fmt::h787b219e21ce34f0
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/core/src/panicking.rs:72:14
  18:     0x7003f30e24ef - core::panicking::panic::h9bccb890458b6c63
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/core/src/panicking.rs:141:5
  19:     0x7003f30e21c9 - core::option::unwrap_failed::h04baebf99e15abba
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/core/src/option.rs:1984:5
  20:     0x7003f26624ea - <core[8ca2cc90ba3a0179]::iter::adapters::map::Map<core[8ca2cc90ba3a0179]::iter::adapters::zip::Zip<core[8ca2cc90ba3a0179]::iter::adapters::copied::Copied<core[8ca2cc90ba3a0179]::slice::iter::Iter<rustc_middle[11164a6ce117b708]::ty::generic_args::GenericArg>>, core[8ca2cc90ba3a0179]::slice::iter::Iter<rustc_type_ir[d4fbe331e6f114bc]::Variance>>, <rustc_middle[11164a6ce117b708]::ty::OpaqueTypeKey>::fold_captured_lifetime_args<<rustc_borrowck[99d68c7cb85fb8e3]::region_infer::RegionInferenceContext>::infer_opaque_types::{closure#0}::{closure#0}>::{closure#0}> as core[8ca2cc90ba3a0179]::iter::traits::iterator::Iterator>::next.cold
  21:     0x7003ee44b8e7 - rustc_borrowck[99d68c7cb85fb8e3]::nll::compute_regions
  22:     0x7003f1d1144e - rustc_borrowck[99d68c7cb85fb8e3]::do_mir_borrowck
  23:     0x7003f1d036ca - rustc_borrowck[99d68c7cb85fb8e3]::mir_borrowck
  24:     0x7003f1d030e9 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>
  25:     0x7003f1260eb1 - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::VecCache<rustc_span[1f43cfd63a717c3a]::def_id::LocalDefId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  26:     0x7003f126090c - rustc_query_impl[2063281436f076b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  27:     0x7003f18a2242 - rustc_middle[11164a6ce117b708]::query::plumbing::query_get_at::<rustc_query_system[8bdce35ed35c4821]::query::caches::VecCache<rustc_span[1f43cfd63a717c3a]::def_id::LocalDefId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>>
  28:     0x7003f18a22a0 - <rustc_borrowck[99d68c7cb85fb8e3]::type_check::TypeChecker>::prove_closure_bounds
  29:     0x7003f101b83c - <rustc_borrowck[99d68c7cb85fb8e3]::type_check::TypeChecker>::typeck_mir
  30:     0x7003eeb516b2 - rustc_borrowck[99d68c7cb85fb8e3]::type_check::type_check
  31:     0x7003ee43a30a - rustc_borrowck[99d68c7cb85fb8e3]::nll::compute_regions
  32:     0x7003f1d1144e - rustc_borrowck[99d68c7cb85fb8e3]::do_mir_borrowck
  33:     0x7003f1d036ca - rustc_borrowck[99d68c7cb85fb8e3]::mir_borrowck
  34:     0x7003f1d030e9 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>
  35:     0x7003f1260eb1 - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::VecCache<rustc_span[1f43cfd63a717c3a]::def_id::LocalDefId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  36:     0x7003f126090c - rustc_query_impl[2063281436f076b]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  37:     0x7003f1458c84 - rustc_middle[11164a6ce117b708]::query::plumbing::query_get_at::<rustc_query_system[8bdce35ed35c4821]::query::caches::VecCache<rustc_span[1f43cfd63a717c3a]::def_id::LocalDefId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>>
  38:     0x7003efbca266 - <rustc_hir_analysis[bcf11c8b5f91f029]::collect::type_of::opaque::TaitConstraintLocator>::check
  39:     0x7003efbb8522 - <rustc_hir_analysis[bcf11c8b5f91f029]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[911005fbb369c69c]::intravisit::Visitor>::visit_item
  40:     0x7003efb95529 - <rustc_hir_analysis[bcf11c8b5f91f029]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[911005fbb369c69c]::intravisit::Visitor>::visit_mod
  41:     0x7003f1c13bbc - rustc_hir_analysis[bcf11c8b5f91f029]::collect::type_of::type_of_opaque
  42:     0x7003f1c13515 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>
  43:     0x7003f0fdf89e - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::DefIdCache<rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  44:     0x7003f1e7189e - rustc_query_impl[2063281436f076b]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7003f14566fe - rustc_middle[11164a6ce117b708]::query::plumbing::query_get_at::<rustc_query_system[8bdce35ed35c4821]::query::caches::DefIdCache<rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>>
  46:     0x7003ee9e1ad1 - rustc_hir_analysis[bcf11c8b5f91f029]::collect::type_of::type_of
  47:     0x7003f0fe0c62 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>
  48:     0x7003f0fdf89e - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::DefIdCache<rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  49:     0x7003f0fdf39b - rustc_query_impl[2063281436f076b]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  50:     0x7003f14566fe - rustc_middle[11164a6ce117b708]::query::plumbing::query_get_at::<rustc_query_system[8bdce35ed35c4821]::query::caches::DefIdCache<rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 8usize]>>>
  51:     0x7003f1e04618 - rustc_hir_analysis[bcf11c8b5f91f029]::check::check::check_item_type
  52:     0x7003f14450ad - rustc_hir_analysis[bcf11c8b5f91f029]::check::wfcheck::check_well_formed
  53:     0x7003f1443b63 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::check_well_formed::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>
  54:     0x7003f1443300 - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::VecCache<rustc_hir[911005fbb369c69c]::hir_id::OwnerId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  55:     0x7003f144307f - rustc_query_impl[2063281436f076b]::query_impl::check_well_formed::get_query_non_incr::__rust_end_short_backtrace
  56:     0x7003f1440fd3 - rustc_hir_analysis[bcf11c8b5f91f029]::check::wfcheck::check_mod_type_wf
  57:     0x7003f1440e1b - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::check_mod_type_wf::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>
  58:     0x7003f1c33b06 - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::DefaultCache<rustc_span[1f43cfd63a717c3a]::def_id::LocalModDefId, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  59:     0x7003f1c338bf - rustc_query_impl[2063281436f076b]::query_impl::check_mod_type_wf::get_query_non_incr::__rust_end_short_backtrace
  60:     0x7003f125dacf - rustc_hir_analysis[bcf11c8b5f91f029]::check_crate
  61:     0x7003f166a3fa - rustc_interface[757df98036431907]::passes::analysis
  62:     0x7003f1669f55 - rustc_query_impl[2063281436f076b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[2063281436f076b]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>
  63:     0x7003f1c09965 - rustc_query_system[8bdce35ed35c4821]::query::plumbing::try_execute_query::<rustc_query_impl[2063281436f076b]::DynamicConfig<rustc_query_system[8bdce35ed35c4821]::query::caches::SingleCache<rustc_middle[11164a6ce117b708]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[2063281436f076b]::plumbing::QueryCtxt, false>
  64:     0x7003f1c096c9 - rustc_query_impl[2063281436f076b]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  65:     0x7003f1a09794 - rustc_interface[757df98036431907]::interface::run_compiler::<core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>, rustc_driver_impl[e492dcc29030f304]::run_compiler::{closure#0}>::{closure#0}
  66:     0x7003f1bc391d - std[cc9b189ccd9d9748]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[757df98036431907]::util::run_in_thread_with_globals<rustc_interface[757df98036431907]::util::run_in_thread_pool_with_globals<rustc_interface[757df98036431907]::interface::run_compiler<core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>, rustc_driver_impl[e492dcc29030f304]::run_compiler::{closure#0}>::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>
  67:     0x7003f1bc372a - <<std[cc9b189ccd9d9748]::thread::Builder>::spawn_unchecked_<rustc_interface[757df98036431907]::util::run_in_thread_with_globals<rustc_interface[757df98036431907]::util::run_in_thread_pool_with_globals<rustc_interface[757df98036431907]::interface::run_compiler<core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>, rustc_driver_impl[e492dcc29030f304]::run_compiler::{closure#0}>::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8ca2cc90ba3a0179]::result::Result<(), rustc_span[1f43cfd63a717c3a]::ErrorGuaranteed>>::{closure#2} as core[8ca2cc90ba3a0179]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  68:     0x7003f30a3a1b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf04c15b7e1b40818
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/alloc/src/boxed.rs:2018:9
  69:     0x7003f30a3a1b - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6efe135dbcc64c78
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/alloc/src/boxed.rs:2018:9
  70:     0x7003f30a3a1b - std::sys::pal::unix::thread::Thread::new::thread_start::h767b00cfb36de6f0
                               at /rustc/63f70b3d104e20289a1a0df82747066c3d85b9a1/library/std/src/sys/pal/unix/thread.rs:108:17
  71:     0x7003ec8a955a - <unknown>
  72:     0x7003ec926a3c - <unknown>
  73:                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 make sure that you have updated to the latest nightly

note: rustc 1.79.0-nightly (63f70b3d1 2024-04-16) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_borrowck] borrow-checking `test2::{closure#0}`
#1 [mir_borrowck] borrow-checking `test2`
#2 [type_of_opaque] computing type of opaque `Opaque2::{opaque#0}`
#3 [type_of] computing type of `Opaque2::{opaque#0}`
#4 [check_well_formed] checking that `Opaque2::{opaque#0}` is well-formed
#5 [check_mod_type_wf] checking that types are well-formed in top-level module
#6 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.

@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 Apr 16, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 16, 2024
@matthiaskrgr
Copy link
Member Author

seems to bisect to #116891 cc @aliemjay

@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 18, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 6, 2024
cleanup region handling: add `LateParamRegionKind`

The second commit is to enable a split between `BoundRegionKind` and `LateParamRegionKind`, by avoiding `BoundRegionKind` where it isn't necessary.

The third comment then adds `LateParamRegionKind` to avoid having the same late-param region for separate bound regions. This fixes rust-lang#124021.

r? `@compiler-errors`
@bors bors closed this as completed in a4079b2 Dec 19, 2024
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 26, 2024
cleanup region handling: add `LateParamRegionKind`

The second commit is to enable a split between `BoundRegionKind` and `LateParamRegionKind`, by avoiding `BoundRegionKind` where it isn't necessary.

The third comment then adds `LateParamRegionKind` to avoid having the same late-param region for separate bound regions. This fixes rust-lang#124021.

r? `@compiler-errors`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants