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: inherent_associated_types: Unexpected parameter Type(..) ... when substituting in region.. #111879

Closed
matthiaskrgr opened this issue May 23, 2023 · 2 comments · Fixed by #111887
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 23, 2023

Code

#![feature(inherent_associated_types)]

pub struct Carrier<'a>(&'a ());

pub type User = for<'b> fn(Carrier<'b>::Focus<i32>);

impl<'a> Carrier<'a> {
    pub type Focus<T> = &'a mut User;
}

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (8b4b20836 2023-05-22)
binary: rustc
commit-hash: 8b4b20836b832e91aa605a2faf5e2a55190202c8
commit-date: 2023-05-22
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.4

Error output

<output>
Backtrace

warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
 --> treereduce.out:1:12
  |
1 | #![feature(inherent_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `treereduce`
 --> treereduce.out:9:2
  |
9 | }
  |  ^ consider adding a `main` function to `treereduce.out`

error: internal compiler error: compiler/rustc_middle/src/ty/subst.rs:810:13: Unexpected parameter Type(Carrier<'b>) when substituting in region 'a (index=0)

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/compiler/rustc_errors/src/lib.rs:1650:9
stack backtrace:
   0:     0x7fe4ff9698b1 - std::backtrace_rs::backtrace::libunwind::trace::hae85fc422d3c99cd
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fe4ff9698b1 - std::backtrace_rs::backtrace::trace_unsynchronized::h7df7656293bb84f6
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fe4ff9698b1 - std::sys_common::backtrace::_print_fmt::h231c03d4db844c40
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fe4ff9698b1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf884134a5b483d22
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fe4ff9c9ddf - core::fmt::rt::Argument::fmt::heb92e6013e7f13fc
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/core/src/fmt/rt.rs:138:9
   5:     0x7fe4ff9c9ddf - core::fmt::write::h81b08859b778ae3a
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fe4ff95cbb1 - std::io::Write::write_fmt::hd7f7d1d5ce09cdf8
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/io/mod.rs:1712:15
   7:     0x7fe4ff9696c5 - std::sys_common::backtrace::_print::h9d4c644a23ab5e56
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fe4ff9696c5 - std::sys_common::backtrace::print::h33b1e6b08313b9e2
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fe4ff96c337 - std::panicking::default_hook::{{closure}}::hc0dcff0dd8533aaa
  10:     0x7fe4ff96c124 - std::panicking::default_hook::h9b7a2e7c397d51fb
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/panicking.rs:288:9
  11:     0x7fe502afe87b - <rustc_driver_impl[303310f8adb0ad67]::install_ice_hook::{closure#0} as core[7158c8a7571cc7e]::ops::function::FnOnce<(&core[7158c8a7571cc7e]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7fe4ff96ca57 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h5ccf88f7e3f09f73
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/alloc/src/boxed.rs:1999:9
  13:     0x7fe4ff96ca57 - std::panicking::rust_panic_with_hook::he9c3fdf8f87db197
                               at /rustc/8b4b20836b832e91aa605a2faf5e2a55190202c8/library/std/src/panicking.rs:695:13
  14:     0x7fe5030084c1 - std[529ec807315ba89a]::panicking::begin_panic::<rustc_errors[e7096101cc5f6cf4]::ExplicitBug>::{closure#0}
  15:     0x7fe5030021c6 - std[529ec807315ba89a]::sys_common::backtrace::__rust_end_short_backtrace::<std[529ec807315ba89a]::panicking::begin_panic<rustc_errors[e7096101cc5f6cf4]::ExplicitBug>::{closure#0}, !>
  16:     0x7fe502fff096 - std[529ec807315ba89a]::panicking::begin_panic::<rustc_errors[e7096101cc5f6cf4]::ExplicitBug>
  17:     0x7fe502ffbc64 - <rustc_errors[e7096101cc5f6cf4]::HandlerInner>::bug::<alloc[523182f74838ec13]::string::String>
  18:     0x7fe502ffba06 - <rustc_errors[e7096101cc5f6cf4]::Handler>::bug::<alloc[523182f74838ec13]::string::String>
  19:     0x7fe50307fbdc - rustc_middle[5d9252383cc0278b]::util::bug::opt_span_bug_fmt::<rustc_span[634f854a761cbb2]::span_encoding::Span>::{closure#0}
  20:     0x7fe50307d0ca - rustc_middle[5d9252383cc0278b]::ty::context::tls::with_opt::<rustc_middle[5d9252383cc0278b]::util::bug::opt_span_bug_fmt<rustc_span[634f854a761cbb2]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7fe50307d09a - rustc_middle[5d9252383cc0278b]::ty::context::tls::with_context_opt::<rustc_middle[5d9252383cc0278b]::ty::context::tls::with_opt<rustc_middle[5d9252383cc0278b]::util::bug::opt_span_bug_fmt<rustc_span[634f854a761cbb2]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7fe50126a4fd - rustc_middle[5d9252383cc0278b]::util::bug::bug_fmt
  23:     0x7fe5030138b1 - <rustc_middle[5d9252383cc0278b]::ty::subst::SubstFolder as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_region::region_param_invalid
  24:     0x7fe500ba7857 - <rustc_middle[5d9252383cc0278b]::ty::subst::GenericArg as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[5d9252383cc0278b]::ty::subst::SubstFolder>
  25:     0x7fe500ba3a0d - <rustc_middle[5d9252383cc0278b]::ty::Ty as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeSuperFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::super_fold_with::<rustc_middle[5d9252383cc0278b]::ty::subst::SubstFolder>
  26:     0x7fe500d415cb - <rustc_middle[5d9252383cc0278b]::ty::print::pretty::FmtPrinter as rustc_middle[5d9252383cc0278b]::ty::print::Printer>::print_def_path
  27:     0x7fe500d40e16 - <rustc_middle[5d9252383cc0278b]::ty::print::pretty::FmtPrinter as rustc_middle[5d9252383cc0278b]::ty::print::Printer>::print_def_path
  28:     0x7fe500d40fcd - <rustc_middle[5d9252383cc0278b]::ty::print::pretty::FmtPrinter as rustc_middle[5d9252383cc0278b]::ty::print::Printer>::print_def_path
  29:     0x7fe50305853b - <rustc_middle[5d9252383cc0278b]::ty::sty::AliasTy as core[7158c8a7571cc7e]::fmt::Display>::fmt
  30:     0x7fe50361ef12 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  31:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  32:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  33:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  34:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  35:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  36:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  37:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  38:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  39:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  40:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  41:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  42:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  43:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  44:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  45:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  46:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  47:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  48:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  49:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  50:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  51:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  52:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  53:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  54:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  55:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  56:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  57:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  58:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  59:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  60:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  61:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  62:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  63:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  64:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  65:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  66:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  67:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  68:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  69:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  70:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  71:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  72:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  73:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  74:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  75:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  76:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  77:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  78:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  79:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  80:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  81:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  82:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  83:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  84:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  85:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  86:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  87:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  88:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  89:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  90:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  91:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  92:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  93:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  94:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  95:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
  96:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
  97:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
  98:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
  99:     0x7fe501002ff6 - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
 100:     0x7fe5010029ec - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
 101:     0x7fe5012799e7 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_with_depth_to::<rustc_middle[5d9252383cc0278b]::ty::Ty>
 102:     0x7fe50361ee76 - rustc_trait_selection[3484f1256632d53f]::traits::project::normalize_inherent_projection
 103:     0x7fe501003efb - <rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFolder<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::fold_ty
 104:     0x7fe50105024c - <&rustc_middle[5d9252383cc0278b]::ty::list::List<rustc_middle[5d9252383cc0278b]::ty::Ty> as rustc_type_ir[2ad15e2f9d3f40f0]::fold::TypeFoldable<rustc_middle[5d9252383cc0278b]::ty::context::TyCtxt>>::try_fold_with::<rustc_trait_selection[3484f1256632d53f]::traits::project::AssocTypeNormalizer>
 .....
 500 more lines

@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. F-inherent_associated_types `#![feature(inherent_associated_types)]` labels May 23, 2023
@matthiaskrgr
Copy link
Member Author

cc @fmease is this fixed by one of your PRs?

This looked like it might be #111390 , but while #111390 was bisected to #105961
this one was bisected to #109410 , not sure what to make of it 🤔

@fmease
Copy link
Member

fmease commented May 23, 2023

Yes, this issue is fixed in #111486 (ice → errors):

stderr
warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
 --> more.rs:1:12
  |
1 | #![feature(inherent_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
  = note: `#[warn(incomplete_features)]` on by default

error[E0601]: `main` function not found in crate `more`
 --> more.rs:9:2
  |
9 | }
  |  ^ consider adding a `main` function to `more.rs`

error: overflow evaluating associated type `Carrier<'b>::Focus<i32>`
 --> more.rs:8:25
  |
8 |     pub type Focus<T> = &'a mut User;
  |                         ^^^^^^^^^^^^

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0601`.

I'm not sure why the bisection points differ, they all share the same root cause. It doesn't really matter though.

Btw, I saw your older comment about another new reproducer but I dismissed it as irrelevant since I assumed it required -Zdump-mir=all, too (I did run it but didn't notice I could omit that flag). Sorry about that. Thanks for opening a separate issue because now we actually have 2 beautiful regression tests for the bug fixed in #111486! So let's not close this issue then but wait for #111486 to get merged and then I will open a separate PR with the regression tests & assign you.

@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.

2 participants