diff options
| author | bors <bors@rust-lang.org> | 2023-08-08 13:03:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-08 13:03:10 +0000 |
| commit | bf62436bce9668118bc4d5f7795f08745d478ac0 (patch) | |
| tree | c12b2e7e4b87f02f2dddfab50e2feac6dd2bf2f4 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 617821ab32b7a7563f561812385e2fba7b1d2981 (diff) | |
| parent | 0adf7048d23649d561bb121d7e1ab00b4c0269b0 (diff) | |
| download | rust-bf62436bce9668118bc4d5f7795f08745d478ac0.tar.gz rust-bf62436bce9668118bc4d5f7795f08745d478ac0.zip | |
Auto merge of #114602 - compiler-errors:rpit-outlives-sadness, r=oli-obk
Map RPIT duplicated lifetimes back to fn captured lifetimes Use the [`lifetime_mapping`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.OpaqueTy.html#structfield.lifetime_mapping) to map an RPIT's captured lifetimes back to the early- or late-bound lifetimes from its parent function. We may be going thru several layers of mapping, since opaques can be nested, so we introduce `TyCtxt::map_rpit_lifetime_to_fn_lifetime` to loop through several opaques worth of mapping, and handle turning it into a `ty::Region` as well. We can then use this instead of the identity substs for RPITs in `check_opaque_meets_bounds` to address #114285. We can then also use `map_rpit_lifetime_to_fn_lifetime` to properly install bidirectional-outlives predicates for both RPITs and RPITITs. This addresses #114601. I based this on #114574, but I don't actually know how much of that PR we still need, so some code may be redundant now... :shrug: --- Fixes #114597 Fixes #114579 Fixes #114285 Also fixes #114601, since it turns out we had other bugs with RPITITs and their duplicated lifetime params :sweat_smile:. Supersedes #114574 r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
