Account for opaque variance for region outlives and liveness.#106729
Account for opaque variance for region outlives and liveness.#106729cjgillot wants to merge 1 commit intorust-lang:masterfrom
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.
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.