diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-01 13:46:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-01 13:46:01 +0200 |
| commit | ca7e27a71c9d618688d05f22a78b7cc31cf4437f (patch) | |
| tree | dd2b587f8dda38cc029733cedb0dee99eb62a176 /compiler/rustc_codegen_gcc | |
| parent | 9082287213b74f3eb9edc373ca318fd110c1689e (diff) | |
| parent | 8ad5ea7b0190256cd7d7c9d8f3f614ecb14796ad (diff) | |
| download | rust-ca7e27a71c9d618688d05f22a78b7cc31cf4437f.tar.gz rust-ca7e27a71c9d618688d05f22a78b7cc31cf4437f.zip | |
Rollup merge of #113182 - compiler-errors:rpit-stricter-captures, r=oli-obk
Error when RPITITs' hidden types capture more lifetimes than their trait definitions This implements a stricter set of captures rules for RPITITs. They now may only capture: 1. Lifetimes from the impl header (both the self type and any trait substs -- we may want to restrict just to the self type's lifetimes, but the PR makes that easy to do, too) 2. Lifetimes mentioned by the `impl Trait` in the trait method's definition. Namely, they may not mention lifetimes from the method (early or late) that are not mentioned in the `impl Trait`. cc #105258 which I think was trying to do this too, though I'm not super familiar with what exactly differs from that or why that one was broken. cc #112194 (doesn't fix this issue per se, because it's still an open question, but I think this is objectively better than the status quo, and gets us closer to resolving that issue.) Technically is a fix for the ICE in #108580, but it turns that issue into an error now. We can decide separately whether or not nested RPITITs should capture lifetimes from their parents. r? ``@oli-obk``
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
