Uh oh!
There was an error while loading. Please reload this page.
Some assorted region hashing fixes. - #43743
Conversation
This will break |
michaelwoerister
commented
Aug 8, 2017
No it shouldn't because all regions are erased when computing the |
michaelwoerister
commented
Aug 8, 2017
But maybe I read the corresponding RFC wrong and TypeId should act as if everything was anonymized instead of erased? |
eddyb
commented
Aug 8, 2017
@michaelwoerister Are you saying |
michaelwoerister
commented
Aug 8, 2017
I see that that's a problem -- yet the |
eddyb
commented
Aug 8, 2017
@michaelwoerister That's completely different from |
michaelwoerister
commented
Aug 8, 2017
But if we did not have the |
eddyb
commented
Aug 8, 2017
@michaelwoerister Correct. |
d608abf to
dfa5435Comparemichaelwoerister
commented
Aug 9, 2017
I changed the last commit to just call |
eddyb
commented
Aug 9, 2017
@michaelwoerister I still see a removed |
michaelwoerister
commented
Aug 9, 2017
@eddyb Yes, the one in |
eddyb
commented
Aug 9, 2017
@michaelwoerister Okay can you make sure we still produce the same |
dfa5435 to
6dbd846Comparemichaelwoerister
commented
Aug 9, 2017
Done! |
eddyb
commented
Aug 9, 2017
r=me I guess (if the test passes) |
michaelwoerister
commented
Aug 9, 2017
bors
commented
Aug 9, 2017
📌 Commit 6dbd846 has been approved by |
bors
commented
Aug 11, 2017
Some assorted region hashing fixes. This PR contains three changes. 1. It changes what we implement `HashStable` for. Previously, the trait was implemented for things in the local `TyCtxt`. That was OK, since we only invoked hashing with a `TyCtxt<'_, 'tcx, 'tcx>` where there is no difference. With query result hashing this becomes a problem though. So we now implement `HashStable` for things in `'gcx`. 2. The PR makes the regular `HashStable` implementation *not* anonymize late-bound regions anymore. It's a waste of computing resources and it's not clear that it would always be correct to do so. 3. The PR adds an option for stable hashing to treat all regions as erased and uses this new option when computing the `TypeId`. This should help with #41875. I did not add a test case for (3) since that's not possible yet. But it looks like @zackmdavis has something in the pipeline there `:)`. r? @eddyb
bors
commented
Aug 11, 2017
☀️ Test successful - status-appveyor, status-travis |
This PR contains three changes.
HashStablefor. Previously, the trait was implemented for things in the localTyCtxt. That was OK, since we only invoked hashing with aTyCtxt<'_, 'tcx, 'tcx>where there is no difference. With query result hashing this becomes a problem though. So we now implementHashStablefor things in'gcx.HashStableimplementation not anonymize late-bound regions anymore. It's a waste of computing resources and it's not clear that it would always be correct to do so.TypeId. This should help with Tracking issue for non_static_type_id #41875.I did not add a test case for (3) since that's not possible yet. But it looks like @zackmdavis has something in the pipeline there
:).r? @eddyb