Make use of the implemented red/green algorithm for variance#47696
Make use of the implemented red/green algorithm for variance#47696bors merged 1 commit intorust-lang:masterfrom
Conversation
|
The Details |
|
r? @nikomatsakis |
| } | ||
|
|
||
| #[rustc_if_this_changed] | ||
| #[rustc_if_this_changed(Krate)] |
There was a problem hiding this comment.
Huh, this looks suspicious.
There was a problem hiding this comment.
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.
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.
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