Don't share id_map and deref_id_map#82424
Closed
camelid wants to merge 7 commits intorust-lang:masterfrom
Closed
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All the tests passed, so it doesn't seem they need to be shared.
Plus they should be item/page-specific.
I'm not sure why they were shared before. I think the reason
id_mapworked as a shared value before is that it is cleared before rendering
each item (in
render_item). And then I'm guessingderef_id_mapworked because it's a hashmap keyed by
DefId, so there was no overlap(though I'm guessing we could have had issues in the future).
Note that
id_mapcurrently still has to be cleared because otherwisechild items would inherit the
id_mapof their parent. I'm hoping tofigure out a way to stop cloning
Context, but until then we have toreset
id_map.Builds on top of #82356 (otherwise we'd have merge conflicts), so this is
blocked on that PR.