Use def_path_hash_to_def_id when re-using a RawDefId#79915
Merged
bors merged 1 commit intorust-lang:masterfrom Dec 11, 2020
Merged
Use def_path_hash_to_def_id when re-using a RawDefId#79915bors merged 1 commit intorust-lang:masterfrom
def_path_hash_to_def_id when re-using a RawDefId#79915bors merged 1 commit intorust-lang:masterfrom
Conversation
Fixes rust-lang#79890 Previously, we just copied a `RawDefId` from the 'old' map to the 'new' map. However, the `RawDefId` for a given `DefPathHash` may be different in the current compilation session. Using `def_path_hash_to_def_id` ensures that the `RawDefId` we use is valid in the current session.
Contributor
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
|
don't know enough about this r? @petrochenkov maybe |
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 3918b82 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Dec 10, 2020
…sh, r=petrochenkov Use `def_path_hash_to_def_id` when re-using a `RawDefId` Fixes rust-lang#79890 Previously, we just copied a `RawDefId` from the 'old' map to the 'new' map. However, the `RawDefId` for a given `DefPathHash` may be different in the current compilation session. Using `def_path_hash_to_def_id` ensures that the `RawDefId` we use is valid in the current session.
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
Closed
Member
|
Following up on #79721 this also seems to have performance issues (albeit with the clap benchmark showing improvement). |
Member
|
Given @wesleywiser's comment on #79721, it seems like regressions here are totally acceptable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Fixes #79890
Previously, we just copied a
RawDefIdfrom the 'old' map to the 'new'map. However, the
RawDefIdfor a givenDefPathHashmay be differentin the current compilation session. Using
def_path_hash_to_def_idensures that the
RawDefIdwe use is valid in the current session.