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: cannot relate bound region: ReLateBound(DebruijnIndex(2), BoundRegion { ... } <= ReErased #111404

Closed
matthiaskrgr opened this issue May 9, 2023 · 5 comments · Fixed by #112493
Assignees
Labels
C-bug Category: This is a bug. F-inherent_associated_types `#![feature(inherent_associated_types)]` 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.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented May 9, 2023

Code

struct Foo<T>(T);

impl<'a> Foo<fn(&'a ())> {
    type Assoc = &'a ();
}

fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'a ())>::Assoc)>::Assoc)) {}

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (2f2c438dc 2023-05-08)
binary: rustc
commit-hash: 2f2c438dce75d8cc532c3baa849eeddc0901802c
commit-date: 2023-05-08
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

<output>
Backtrace

error: internal compiler error: compiler/rustc_infer/src/infer/region_constraints/mod.rs:533:17: cannot relate bound region: ReLateBound(DebruijnIndex(2), BoundRegion { var: 0, kind: BrNamed(DefId(0:11 ~ treereduce[fc7f]::bar::'a), 'a) }) <= ReErased

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/compiler/rustc_errors/src/lib.rs:994:33
stack backtrace:
   0:     0x7fe327d6a361 - std::backtrace_rs::backtrace::libunwind::trace::he9e9030cf5bcddaa
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fe327d6a361 - std::backtrace_rs::backtrace::trace_unsynchronized::hb5e44a77ff0586eb
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fe327d6a361 - std::sys_common::backtrace::_print_fmt::h38e8723c5d83f22f
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fe327d6a361 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5e394c4b1f1cb045
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fe327dca6ff - core::fmt::rt::Argument::fmt::ha5dde4cb71578cc2
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/core/src/fmt/rt.rs:138:9
   5:     0x7fe327dca6ff - core::fmt::write::hb1413899fd777907
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fe327d5d5c1 - std::io::Write::write_fmt::h08b4eac68313bb0d
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/io/mod.rs:1712:15
   7:     0x7fe327d6a175 - std::sys_common::backtrace::_print::h2bb25f41b1777226
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fe327d6a175 - std::sys_common::backtrace::print::ha21981aa5a1c5802
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fe327d6ce07 - std::panicking::default_hook::{{closure}}::h603ce04329232051
  10:     0x7fe327d6cbf4 - std::panicking::default_hook::hd4285764fbdb24e1
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/panicking.rs:288:9
  11:     0x7fe32afbf94b - <rustc_driver_impl[27c68de0ac55b06a]::install_ice_hook::{closure#0} as core[3afeaedfb140cde7]::ops::function::FnOnce<(&core[3afeaedfb140cde7]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7fe327d6d527 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h401f21a7538313bc
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/alloc/src/boxed.rs:1999:9
  13:     0x7fe327d6d527 - std::panicking::rust_panic_with_hook::h2322eda2481f33bc
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/panicking.rs:695:13
  14:     0x7fe32b2f4041 - std[53b54636b4f52653]::panicking::begin_panic::<rustc_errors[2afb0e2cc7c4c42d]::ExplicitBug>::{closure#0}
  15:     0x7fe32b2f12c6 - std[53b54636b4f52653]::sys_common::backtrace::__rust_end_short_backtrace::<std[53b54636b4f52653]::panicking::begin_panic<rustc_errors[2afb0e2cc7c4c42d]::ExplicitBug>::{closure#0}, !>
  16:     0x7fe32b29e9d6 - std[53b54636b4f52653]::panicking::begin_panic::<rustc_errors[2afb0e2cc7c4c42d]::ExplicitBug>
  17:     0x7fe32b2ecd8e - <rustc_errors[2afb0e2cc7c4c42d]::HandlerInner>::span_bug::<rustc_span[811089187935bcb6]::span_encoding::Span, alloc[a4f318becb59a05]::string::String>
  18:     0x7fe32b2eca5d - <rustc_errors[2afb0e2cc7c4c42d]::Handler>::span_bug::<rustc_span[811089187935bcb6]::span_encoding::Span, alloc[a4f318becb59a05]::string::String>
  19:     0x7fe32b289e6d - rustc_middle[232bd29a687eeda3]::util::bug::opt_span_bug_fmt::<rustc_span[811089187935bcb6]::span_encoding::Span>::{closure#0}
  20:     0x7fe32b289e9a - rustc_middle[232bd29a687eeda3]::ty::context::tls::with_opt::<rustc_middle[232bd29a687eeda3]::util::bug::opt_span_bug_fmt<rustc_span[811089187935bcb6]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7fe32b2828aa - rustc_middle[232bd29a687eeda3]::ty::context::tls::with_context_opt::<rustc_middle[232bd29a687eeda3]::ty::context::tls::with_opt<rustc_middle[232bd29a687eeda3]::util::bug::opt_span_bug_fmt<rustc_span[811089187935bcb6]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7fe32b282854 - rustc_middle[232bd29a687eeda3]::util::bug::span_bug_fmt::<rustc_span[811089187935bcb6]::span_encoding::Span>
  23:     0x7fe32952da94 - rustc_middle[232bd29a687eeda3]::ty::relate::super_relate_tys::<rustc_infer[11979153bc07d692]::infer::sub::Sub>
  24:     0x7fe329504ef9 - <rustc_infer[11979153bc07d692]::infer::sub::Sub as rustc_middle[232bd29a687eeda3]::ty::relate::TypeRelation>::tys
  25:     0x7fe32a5041b3 - <core[3afeaedfb140cde7]::result::Result<rustc_middle[232bd29a687eeda3]::ty::Ty, rustc_middle[232bd29a687eeda3]::ty::error::TypeError> as rustc_type_ir[cc09a4b81b2ca552]::CollectAndApply<rustc_middle[232bd29a687eeda3]::ty::Ty, &rustc_middle[232bd29a687eeda3]::ty::list::List<rustc_middle[232bd29a687eeda3]::ty::Ty>>>::collect_and_apply::<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::enumerate::Enumerate<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::chain::Chain<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::zip::Zip<core[3afeaedfb140cde7]::slice::iter::Iter<rustc_middle[232bd29a687eeda3]::ty::Ty>, core[3afeaedfb140cde7]::slice::iter::Iter<rustc_middle[232bd29a687eeda3]::ty::Ty>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#0}>, core[3afeaedfb140cde7]::iter::sources::once::Once<((rustc_middle[232bd29a687eeda3]::ty::Ty, rustc_middle[232bd29a687eeda3]::ty::Ty), bool)>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#1}>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#2}>, <rustc_middle[232bd29a687eeda3]::ty::context::TyCtxt>::mk_type_list_from_iter<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::enumerate::Enumerate<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::chain::Chain<core[3afeaedfb140cde7]::iter::adapters::map::Map<core[3afeaedfb140cde7]::iter::adapters::zip::Zip<core[3afeaedfb140cde7]::slice::iter::Iter<rustc_middle[232bd29a687eeda3]::ty::Ty>, core[3afeaedfb140cde7]::slice::iter::Iter<rustc_middle[232bd29a687eeda3]::ty::Ty>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#0}>, core[3afeaedfb140cde7]::iter::sources::once::Once<((rustc_middle[232bd29a687eeda3]::ty::Ty, rustc_middle[232bd29a687eeda3]::ty::Ty), bool)>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#1}>>, <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate<rustc_infer[11979153bc07d692]::infer::sub::Sub>::{closure#2}>, core[3afeaedfb140cde7]::result::Result<rustc_middle[232bd29a687eeda3]::ty::Ty, rustc_middle[232bd29a687eeda3]::ty::error::TypeError>>::{closure#0}>
  26:     0x7fe32a503a62 - <rustc_middle[232bd29a687eeda3]::ty::sty::FnSig as rustc_middle[232bd29a687eeda3]::ty::relate::Relate>::relate::<rustc_infer[11979153bc07d692]::infer::sub::Sub>
  27:     0x7fe3295300c1 - <rustc_infer[11979153bc07d692]::infer::combine::CombineFields>::higher_ranked_sub::<rustc_middle[232bd29a687eeda3]::ty::sty::FnSig>
  28:     0x7fe32952febb - <rustc_infer[11979153bc07d692]::infer::sub::Sub as rustc_middle[232bd29a687eeda3]::ty::relate::TypeRelation>::relate::<rustc_middle[232bd29a687eeda3]::ty::sty::Binder<rustc_middle[232bd29a687eeda3]::ty::sty::FnSig>>
  29:     0x7fe32952cccc - rustc_middle[232bd29a687eeda3]::ty::relate::super_relate_tys::<rustc_infer[11979153bc07d692]::infer::sub::Sub>
  30:     0x7fe329504ef9 - <rustc_infer[11979153bc07d692]::infer::sub::Sub as rustc_middle[232bd29a687eeda3]::ty::relate::TypeRelation>::tys
  31:     0x7fe32952ac43 - rustc_middle[232bd29a687eeda3]::ty::relate::super_relate_tys::<rustc_infer[11979153bc07d692]::infer::sub::Sub>
  32:     0x7fe329504ef9 - <rustc_infer[11979153bc07d692]::infer::sub::Sub as rustc_middle[232bd29a687eeda3]::ty::relate::TypeRelation>::tys
  33:     0x7fe32a517fd3 - <rustc_infer[11979153bc07d692]::infer::at::At>::sub_exp::<rustc_middle[232bd29a687eeda3]::ty::Ty>
  34:     0x7fe32a8a926a - <rustc_trait_selection[3f922efa7a809006]::traits::engine::ObligationCtxt>::sup::<rustc_middle[232bd29a687eeda3]::ty::Ty>
  35:     0x7fe32b0f910c - <rustc_infer[11979153bc07d692]::infer::InferCtxt>::probe::<bool, <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::lookup_inherent_assoc_ty::{closure#1}::{closure#3}::{closure#0}>
  36:     0x7fe32b103921 - <&mut <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::lookup_inherent_assoc_ty::{closure#1}::{closure#3} as core[3afeaedfb140cde7]::ops::function::FnMut<(&(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId)),)>>::call_mut
  37:     0x7fe32b0e383b - <core[3afeaedfb140cde7]::iter::adapters::copied::Copied<core[3afeaedfb140cde7]::slice::iter::Iter<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId))>> as core[3afeaedfb140cde7]::iter::traits::iterator::Iterator>::try_fold::<(), core[3afeaedfb140cde7]::iter::traits::iterator::Iterator::find::check<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId)), &mut <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::lookup_inherent_assoc_ty::{closure#1}::{closure#3}>::{closure#0}, core[3afeaedfb140cde7]::ops::control_flow::ControlFlow<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId))>>
  38:     0x7fe32b110e08 - <alloc[a4f318becb59a05]::vec::Vec<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId))> as alloc[a4f318becb59a05]::vec::spec_from_iter::SpecFromIter<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId)), core[3afeaedfb140cde7]::iter::adapters::filter::Filter<core[3afeaedfb140cde7]::iter::adapters::copied::Copied<core[3afeaedfb140cde7]::slice::iter::Iter<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId))>>, <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::lookup_inherent_assoc_ty::{closure#1}::{closure#3}>>>::from_iter
  39:     0x7fe32b0f8f88 - <rustc_infer[11979153bc07d692]::infer::InferCtxt>::probe::<alloc[a4f318becb59a05]::vec::Vec<(rustc_span[811089187935bcb6]::def_id::DefId, (rustc_span[811089187935bcb6]::def_id::DefId, rustc_span[811089187935bcb6]::def_id::DefId))>, <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::lookup_inherent_assoc_ty::{closure#1}>
  40:     0x7fe329decb8c - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::associated_path_to_ty::{closure#0}
  41:     0x7fe329dd43e5 - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ast_ty_to_ty_inner::{closure#0}
  42:     0x7fe3293036ac - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ty_of_fn::{closure#0}
  43:     0x7fe329dd5225 - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ast_ty_to_ty_inner::{closure#0}
  44:     0x7fe329dd96cd - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::res_to_ty
  45:     0x7fe329dd3fa0 - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ast_ty_to_ty_inner::{closure#0}
  46:     0x7fe329dd439a - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ast_ty_to_ty_inner::{closure#0}
  47:     0x7fe3293036ac - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ty_of_fn::{closure#0}
  48:     0x7fe329dd5225 - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ast_ty_to_ty_inner::{closure#0}
  49:     0x7fe3293036ac - <dyn rustc_hir_analysis[7b141ba67a9c3bd8]::astconv::AstConv>::ty_of_fn::{closure#0}
  50:     0x7fe329ec9e8c - rustc_hir_analysis[7b141ba67a9c3bd8]::collect::infer_return_ty_for_fn_sig
  51:     0x7fe329ec86ab - rustc_hir_analysis[7b141ba67a9c3bd8]::collect::fn_sig
  52:     0x7fe329ec66f6 - rustc_query_system[8be5ea0cc4c28ea6]::query::plumbing::try_execute_query::<rustc_query_impl[94005537e54250be]::queries::fn_sig, rustc_query_impl[94005537e54250be]::plumbing::QueryCtxt>
  53:     0x7fe329635c58 - rustc_middle[232bd29a687eeda3]::ty::query::query_ensure::<rustc_query_system[8be5ea0cc4c28ea6]::query::caches::DefaultCache<rustc_span[811089187935bcb6]::def_id::DefId, rustc_middle[232bd29a687eeda3]::query::erase::Erased<[u8; 24usize]>>>
  54:     0x7fe32963484c - <rustc_hir_analysis[7b141ba67a9c3bd8]::collect::CollectItemTypesVisitor as rustc_hir[2c98ace9d294e49]::intravisit::Visitor>::visit_item
  55:     0x7fe329633917 - <rustc_middle[232bd29a687eeda3]::hir::map::Map>::visit_item_likes_in_module::<rustc_hir_analysis[7b141ba67a9c3bd8]::collect::CollectItemTypesVisitor>
  56:     0x7fe32963382c - rustc_hir_analysis[7b141ba67a9c3bd8]::collect::collect_mod_item_types
  57:     0x7fe32a618671 - rustc_query_system[8be5ea0cc4c28ea6]::query::plumbing::try_execute_query::<rustc_query_impl[94005537e54250be]::queries::collect_mod_item_types, rustc_query_impl[94005537e54250be]::plumbing::QueryCtxt>
  58:     0x7fe32a6182b1 - rustc_query_impl[94005537e54250be]::get_query::collect_mod_item_types
  59:     0x7fe32a3f9447 - <rustc_middle[232bd29a687eeda3]::hir::map::Map>::for_each_module::<rustc_hir_analysis[7b141ba67a9c3bd8]::check_crate::{closure#0}::{closure#0}::{closure#0}>
  60:     0x7fe32a3f59e0 - rustc_hir_analysis[7b141ba67a9c3bd8]::check_crate
  61:     0x7fe32a3e9df0 - rustc_interface[1005215f39c21569]::passes::analysis
  62:     0x7fe32a72bd47 - rustc_query_system[8be5ea0cc4c28ea6]::query::plumbing::try_execute_query::<rustc_query_impl[94005537e54250be]::queries::analysis, rustc_query_impl[94005537e54250be]::plumbing::QueryCtxt>
  63:     0x7fe32a72ba63 - rustc_query_impl[94005537e54250be]::get_query::analysis
  64:     0x7fe32a1ccbcf - <rustc_middle[232bd29a687eeda3]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[27c68de0ac55b06a]::run_compiler::{closure#1}::{closure#2}::{closure#4}, core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>>
  65:     0x7fe32a1cbcaf - <rustc_interface[1005215f39c21569]::interface::Compiler>::enter::<rustc_driver_impl[27c68de0ac55b06a]::run_compiler::{closure#1}::{closure#2}, core[3afeaedfb140cde7]::result::Result<core[3afeaedfb140cde7]::option::Option<rustc_interface[1005215f39c21569]::queries::Linker>, rustc_span[811089187935bcb6]::ErrorGuaranteed>>
  66:     0x7fe32a1c933b - std[53b54636b4f52653]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1005215f39c21569]::util::run_in_thread_pool_with_globals<rustc_interface[1005215f39c21569]::interface::run_compiler<core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>, rustc_driver_impl[27c68de0ac55b06a]::run_compiler::{closure#1}>::{closure#0}, core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>>
  67:     0x7fe32a898f55 - <<std[53b54636b4f52653]::thread::Builder>::spawn_unchecked_<rustc_interface[1005215f39c21569]::util::run_in_thread_pool_with_globals<rustc_interface[1005215f39c21569]::interface::run_compiler<core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>, rustc_driver_impl[27c68de0ac55b06a]::run_compiler::{closure#1}>::{closure#0}, core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[3afeaedfb140cde7]::result::Result<(), rustc_span[811089187935bcb6]::ErrorGuaranteed>>::{closure#1} as core[3afeaedfb140cde7]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  68:     0x7fe327d779d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h20fe0a24dda744f1
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/alloc/src/boxed.rs:1985:9
  69:     0x7fe327d779d5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb11b4529d66356f4
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/alloc/src/boxed.rs:1985:9
  70:     0x7fe327d779d5 - std::sys::unix::thread::Thread::new::thread_start::h896be1b4ceadbc98
                               at /rustc/2f2c438dce75d8cc532c3baa849eeddc0901802c/library/std/src/sys/unix/thread.rs:108:17
  71:     0x7fe327b13bb5 - <unknown>
  72:     0x7fe327b95d90 - <unknown>
  73:                0x0 - <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: rustc 1.71.0-nightly (2f2c438dc 2023-05-08) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [fn_sig] computing function signature of `bar`
#1 [collect_mod_item_types] collecting item types in top-level module
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

For more information about this 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 May 9, 2023
@matthiaskrgr
Copy link
Member Author

Hm, maybe not really a new (this month) regression but I also can't find any obvious duplicates right now...

@matthiaskrgr
Copy link
Member Author

searched toolchains nightly-2022-11-28 through nightly-2023-05-09
Regression in nightly-2022-12-05
Regression in 0f0d5d7
rust-lang-ci@9437a2b
#105224 cc @cjgillot

@cjgillot cjgillot self-assigned this May 9, 2023
@fmease
Copy link
Member

fmease commented May 9, 2023

@rustbot label F-inherent_associated_types

@rustbot rustbot added the F-inherent_associated_types `#![feature(inherent_associated_types)]` label May 9, 2023
@fmease
Copy link
Member

fmease commented Jun 9, 2023

I'm pretty sure this can be fixed by erasing all regions no matter their de Bruijn index via fold_regions instead of replace_escaping_bound_vars_uncached. This would "regress" #[feature(inherent_associated_types, non_lifetime_binders)] but eh, I guess that's fine for now.

@cjgillot cjgillot removed their assignment Jun 9, 2023
@fmease
Copy link
Member

fmease commented Jun 10, 2023

@rustbot claim

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-inherent_associated_types `#![feature(inherent_associated_types)]` 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants