Uh oh!
There was an error while loading. Please reload this page.
save subobligations in the projection cache - #43546
Conversation
alexcrichton
commented
Jul 29, 2017
I've "minimized" a test case which at least doesn't depend on the futures crate, but I wouldn't necessarily call it small yet. |
est31
commented
Jul 29, 2017
I've managed to make @alexcrichton 's example a bit smaller (118 lines -> 60 lines). |
beta-nominating because this is a regression - I shuffled things around and made evaluation easier to reach. r=me with a test. |
bors
commented
Jul 30, 2017
☔ The latest upstream changes (presumably #43543) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Jul 30, 2017
@bor: r=arielb1 |
alexcrichton
commented
Jul 31, 2017
@bors: r=arielb1 |
bors
commented
Jul 31, 2017
📌 Commit 2574f31 has been approved by |
bors
commented
Jul 31, 2017
save subobligations in the projection cache The projection cache explicitly chose not to "preserve" subobligations for projections, since the fulfillment context ought to have been doing so. But for the trait evaluation scheme that causes problems. This PR reproduces subobligations. This has the potential to slow down compilation, but minimal investigation suggests it does not do so. One hesitation about this PR: I could not find a way to make a standalone test case for #43132 (but admittedly I did not try very hard). Fixes#43132. r? @arielb1
bors
commented
Jul 31, 2017
☀️ Test successful - status-appveyor, status-travis |
nikomatsakis
commented
Jul 31, 2017
I'm marking this as beta-accepted -- it's a small and harmless patch. |
arielb1
commented
Aug 1, 2017
The author of #43132 complains that this caused an exponential case in his code. I can believe that - need to investigate. |
alexcrichton
commented
Aug 1, 2017
It looks like at least one test also regressed on perf.rust-lang.org |
This effectively reverts rust-lang#43546 as it seems that it does affect performance more than the PR has anticipated. Follow-up changes from rust-lang#44269 are also reverted. This also removes the deduplication code from rust-lang#48296 as duplications were primarily coming from rust-lang#43546 and after removing that code it probably doesn't worth paying the cost of using a hash map.
The projection cache explicitly chose not to "preserve" subobligations for projections, since the fulfillment context ought to have been doing so. But for the trait evaluation scheme that causes problems. This PR reproduces subobligations. This has the potential to slow down compilation, but minimal investigation suggests it does not do so.
One hesitation about this PR: I could not find a way to make a standalone test case for #43132 (but admittedly I did not try very hard).
Fixes#43132.
r? @arielb1