-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Account for opaque variance for region outlives and liveness. #106729
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
I'm a bit worried about beta branching soon. Perhaps someone from @rust-lang/types can give this a review, ideally we'd have it looked at before T-compiler meeting tomorrow, as this should probably be backported. I will alternatively prepare a revert for #105255, which should be backported instead if this one can't make it then. |
let variance = if let Some(variances) = opt_variances { | ||
variances[index] | ||
} else { | ||
ty::Invariant | ||
}; |
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.
Please add a comment that we only need to do this for lifetimes and not type substs, because this is only used for opaque types, which only generate interesting variance for lifetimes, not type parameters
r? @oli-obk |
…jgillot Revert "Make nested RPITIT inherit the parent opaque's generics." This reverts commit e2d41f4, and adjusts the `tests/ui/async-await/in-trait/nested-rpit.rs` test. r? `@cjgillot` fixes rust-lang#106332, manually verified because it had no minimization :/ reopens rust-lang#105197 cc rust-lang#106729
☔ The latest upstream changes (presumably #106910) made this pull request unmergeable. Please resolve the merge conflicts. |
Should fix #106332
I did not manage to extract a MCVE, so I don't have a test yet.
Putting this up for review in the mean time.