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
Further reduced:
searched toolchains nightly-2023-01-26 through nightly-2023-04-28 Regression in nightly-2023-01-29 searched toolchains through Regression in cc
Are you sure? The linked PR does not touch parser nor lowering. It just touches typeck and what happens after it.
oh right, hm, I'm getting different results now, maybe I forgot to press ctrl+s on the bisection snippet... :upsidedownface: searched toolchains nightly-2022-07-14 through nightly-2023-04-28 Regression in nightly-2022-07-26 commit[0] 2022-07-24: Auto merge of - RalfJung:rollup-bojacrc, r=RalfJung commit[1] 2022-07-24: Auto merge of - fasterthanlime:ra-subtree-2, r=jyn514 commit[2] 2022-07-25: Auto merge of - AngelicosPhosphoros:improvecalloccheckinvecmacrofor_tuples, r=Mark-Simulacrum commit[3] 2022-07-25: Auto merge of - thomcc:dont-overwrite, r=tmiasko commit[4] 2022-07-25: Auto merge of - klensy:no-string-dupes-ugly, r=cjgillot commit[5] 2022-07-25: Auto merge of - tmiasko:subst-folder, r=petrochenkov commit[6] 2022-07-25: Auto merge of - JohnTitor:rollup-74rb8vq, r=JohnTitor commit[7] 2022-07-25: Auto merge of - csmoe:export-exe-sym, r=bjorn3 commit[8] 2022-07-25: Auto merge of - RalfJung:miri, r=RalfJung commit[9] 2022-07-25: Auto merge of - cjgillot:ast-lifetimes-anon, r=petrochenkov maybe ?

Discussion:
} visit::walk_ty(self, ty) } <ins> // A type may have an expression as a const generic argument. // We do not want to recurse into those. fn visit_expr(&mut self, _: &'a Expr) {} </ins> } let impl_self = self

<ins> // Regression test for #110899. // When looking for the elided lifetime for `wrap`, // we must not consider the lifetimes in `bar` as candidates. fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { //~^ ERROR `self` parameter is only allowed in associated functions //~| ERROR `self` parameter is only allowed in associated functions //~| ERROR missing lifetime specifier //~| ERROR cannot find type `Wrap` in this scope &() } fn main() {} </ins>

<ins> error: `self` parameter is only allowed in associated functions --> $DIR/nested-item.rs:5:9 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { |         ^^^^ not semantically valid as function parameter | = note: associated functions are those in `impl` or `trait` definitions error: `self` parameter is only allowed in associated functions --> $DIR/nested-item.rs:5:29 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { |                             ^^^^^ not semantically valid as function parameter | = note: associated functions are those in `impl` or `trait` definitions error[E0106]: missing lifetime specifier --> $DIR/nested-item.rs:5:46 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { |                                              ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () { |                                               +++++++ error[E0412]: cannot find type `Wrap` in this scope --> $DIR/nested-item.rs:5:15 | LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() { |               ^^^^ not found in this scope error: aborting due to 4 previous errors Some errors have detailed explanations: E0106, E0412. For more information about an error, try `rustc --explain E0106`. </ins>