Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
See also , but while only reproduces with rustdoc, this one only repros with rustc and not rustdoc :thinking:
searched nightlies: from nightly-2023-01-01 to nightly-2023-04-11 regressed nightly: nightly-2023-03-29 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.6</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </details
claim I'll have a go at this, no idea if I'll be able to do it.
This is an ICE on invalid code. label regression-from-stable-to-nightly Minimized: this can be fixed by replacing the assertion with and returning early to avoid processing unconstrained lifetime variables in implied bounds. It would be nice if we have a comment referring to this issue or to the ui test for why delaying a bug was necessary.
btw, you should update your cargo-bisect-rustc to make it bisect the contents of rollups as well.
It is, unfortunately the regression is old enough that perf artifacts are gone :(
It's not old, but I remember now, this was my cursed rollup that didn't get unrolled perf builds. It also was a perf regression which made it pretty annoying :D

Discussion:
) -> Vec<OutlivesBound<'tcx>> { let ty = self.resolve_vars_if_possible(ty); let ty = OpportunisticRegionResolver::new(self).fold_ty(ty); <del> assert!(!ty.needs_infer()); </del> <ins> // We do not expect existential variables in implied bounds. // We may however encounter unconstrained lifetime variables in invalid // code. See #110161 for context. assert!(!ty.has_non_region_infer()); if ty.needs_infer() { self.tcx.sess.delay_span_bug( self.tcx.def_span(body_id), "skipped implied_outlives_bounds due to unconstrained lifetimes", ); return vec![]; } </ins> let span = self.tcx.def_span(body_id); let result = param_env

<ins> // ICE regression relating to unconstrained lifetimes in implied // bounds. See #110161. // compile-flags: --crate-type=lib trait LtTrait { type Ty; } // erroneous `Ty` impl impl LtTrait for () { //~^ ERROR not all trait items implemented, missing: `Ty` [E0046] } // `'lt` is not constrained by the erroneous `Ty` impl<'lt, T> LtTrait for Box<T> where T: LtTrait<Ty = &'lt ()>, { type Ty = &'lt (); } // unconstrained lifetime appears in implied bounds fn test(_: <Box<()> as LtTrait>::Ty) {} fn test2<'x>(_: &'x <Box<()> as LtTrait>::Ty) {} </ins>

<ins> error[E0046]: not all trait items implemented, missing: `Ty` --> $DIR/issue-110161.rs:11:1 | LL |     type Ty; |     ------- `Ty` from trait ... LL | impl LtTrait for () { | ^^^^^^^^^^^^^^^^^^^ missing `Ty` in implementation error: aborting due to previous error For more information about this error, try `rustc --explain E0046`. </ins>