diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-04-24 11:15:12 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-05-03 16:42:07 -0400 |
| commit | 4824a199ca3c6c1c12c90f0146db540045220c9a (patch) | |
| tree | 13fc7438a45773d7d0d3ea4f94d706be650b4f20 /src/test/incremental/thinlto | |
| parent | 55412a201aa687e16cb76681d8dc7d595253800d (diff) | |
| download | rust-4824a199ca3c6c1c12c90f0146db540045220c9a.tar.gz rust-4824a199ca3c6c1c12c90f0146db540045220c9a.zip | |
factor variances into a proper query
There are now two queries: crate and item. The crate one computes the variance of all items in the crate; it is sort of an implementation detail, and not meant to be used. The item one reads from the crate one, synthesizing correct deps in lieu of the red-green algorithm. At the same time, remove the `variance_computed` flag, which was a horrible hack used to force invariance early on (e.g. when type-checking constants). This is only needed because of trait applications, and traits are always invariant anyway. Therefore, we now change to take advantage of the query system: - When asked to compute variances for a trait, just return a vector saying 'all invariant'. - Remove the corresponding "inferreds" from traits, and tweak the constraint generation code to understand that traits are always inferred.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
