-
Couldn't load subscription status.
- Fork 13.9k
Make use of the implemented red/green algorithm for variance #47696
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
Conversation
|
The |
|
r? @nikomatsakis |
| } | ||
|
|
||
| #[rustc_if_this_changed] | ||
| #[rustc_if_this_changed(Krate)] |
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.
Huh, this looks suspicious.
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.
This change doesn't seem right to me. I think we do expect to have to recompute item-variances for Use if the type alias changes. I would sort of expect that it would be an input into the AdtDef or what have you for Use... but I guess it might not be working out that way? Did you dig into what's going on here?
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.
The CrateVariances dep node is eval_always, so it only depends on Krate and not on any Hir nodes. This in turn means that ItemVariances won't transitively depend on any Hir nodes, just Krate. So there won't be a path from Hir(TypeAlias) to ItemVariances. This is still fine though since CrateVariances always gets recomputed. It is also correct without that because Krate has an implicit dependency on everything in a crate.
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.
OK, makes sense. Thanks!
|
@bors r+ |
|
📌 Commit 62afc43 has been approved by |
Make use of the implemented red/green algorithm for variance r? @michaelwoerister
r? @michaelwoerister