granite-rust/compiler/rustc_resolve
bors 2f5df8a94b Auto merge of #115366 - compiler-errors:associated-type-bound-implicit-lifetimes, r=jackh726
Capture lifetimes for associated type bounds destined to be lowered to opaques

Some associated type bounds get lowered to opaques, but they're not represented in the AST as opaques.

That means that we never collect lifetimes for them (`record_lifetime_params_for_impl_trait`) which are used currently for RPITITs, which capture all of their in-scope lifetimes[^1]. This means that the nested RPITITs that arise from some type like `impl Foo<Type: Bar>` (~> `impl Foo<Type = impl Bar>`) don't capture any lifetimes, leading to ICEs.

This PR makes sure we collect the lifetimes for associated type bounds as well, and make sure that they are set up correctly for opaque type lowering later.

Fixes #115360

[^1]: #114489
2023-08-31 21:13:54 +00:00
..
src Auto merge of #115366 - compiler-errors:associated-type-bound-implicit-lifetimes, r=jackh726 2023-08-31 21:13:54 +00:00
Cargo.toml update pulldown-cmark to 0.9.3 2023-05-22 11:35:25 +02:00
messages.ftl Add translatable diagnostic for import resolution strings 2023-06-25 08:29:28 +01:00