about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-31 21:13:54 +0000
committerbors <bors@rust-lang.org>2023-08-31 21:13:54 +0000
commit2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19 (patch)
tree2debe88f71298af364acbe602491b59c32732950 /compiler/rustc_codegen_llvm/src
parent91942134c67bf43ee007351c2a8e378b95623b2e (diff)
parentf1679f7dd6330535cd2dbd0dd18ded0dc8a7e6d9 (diff)
downloadrust-2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19.tar.gz
rust-2f5df8a94bb3c5fae4e3fcbfc8ef20f1f976cb19.zip
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions