-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT #124106
Conversation
LL | | > | ||
| |_____________^ | ||
|
||
error: [*, o] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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