Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT#124106
Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT#124106bors merged 1 commit intorust-lang:masterfrom
Conversation
| LL | | > | ||
| | |_____________^ | ||
|
|
||
| error: [*, o] |
There was a problem hiding this comment.
Previously this would have been [*, *, *, *, *, o]
This comment has been minimized.
This comment has been minimized.
fc312ab to
ffb4206
Compare
won't this change once binders on |
Sorry, I guess I should have been more precise here. The unsubstituted bounds of a child opaque never mention the duplicated lifetimes from the parent opaque. They can only mention the lifetimes that they capture (and thus duplicate into their own early-bound regions -- including from binders they're enclosed in, even though we don't support that). So opaques in binders should definitely still work. |
|
@bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`) - rust-lang#123729 (run-make: refactor out command wrappers for `clang` and `llvm-readobj`) - rust-lang#124106 (Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT) - rust-lang#124149 (rustdoc-search: fix description on aliases in results) - rust-lang#124155 (bootstrap: don't use rayon for sysinfo) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124106 - compiler-errors:tait-lifetime-dedup, r=oli-obk Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT Make it so that nested TAITs inherit the lifetimes from their parent item, not their parent TAIT. This is because we don't need to re-duplicate lifetimes for nested TAITs over and over, since the only lifetimes they can capture are from the parent item anyways. This mirrors how RPITs work. This is **not** a functional change that should be observable, since the whole point of duplicating lifetimes and marking the shadowed ones (and uncaptured ones) as bivariant is designed to *not* be observable. r? oli-obk
Make it so that nested TAITs inherit the lifetimes from their parent item, not their parent TAIT. This is because we don't need to re-duplicate lifetimes for nested TAITs over and over, since the only lifetimes they can capture are from the parent item anyways.
This mirrors how RPITs work. This is not a functional change that should be observable, since the whole point of duplicating lifetimes and marking the shadowed ones (and uncaptured ones) as bivariant is designed to not be observable.
r? oli-obk