about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-30 14:01:36 -0700
committerGitHub <noreply@github.com>2024-10-30 14:01:36 -0700
commit6b60f03f152c439725c80a90702330387670d5c6 (patch)
tree63423686073ba107067e1bee4d35a025495bd0ae /compiler/rustc_codegen_llvm/src
parent759e07f063fb8e6306ff1bdaeb70af56a878b415 (diff)
parent2d74d8f333d77bf53f8ebd590459c61316a4a324 (diff)
downloadrust-6b60f03f152c439725c80a90702330387670d5c6.tar.gz
rust-6b60f03f152c439725c80a90702330387670d5c6.zip
Rollup merge of #129383 - cjgillot:opaque-noremap, r=compiler-errors,petrochenkov
Remap impl-trait lifetimes on HIR instead of AST lowering

Current AST->HIR lowering goes out of its way to remap lifetimes for opaque types. This is complicated and leaks into upstream and downstream code.

This PR stops trying to be clever during lowering, and prefers to do this remapping during the HIR->ty lowering. The remapping computation easily fits into the bound var resolution code. Its result can be used in by `generics_of` and `hir_ty_lowering::new_opaque` to add the proper parameters and arguments.

See an example on the doc for query `opaque_captured_lifetimes`.

Based on https://github.com/rust-lang/rust/pull/129244/

Fixes https://github.com/rust-lang/rust/issues/125249
Fixes https://github.com/rust-lang/rust/issues/126850

cc `@compiler-errors` `@spastorino`
r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions