-
Notifications
You must be signed in to change notification settings - Fork 14k
Use def_path_hash_to_def_id when re-using a RawDefId
#79915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
|
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
|
don't know enough about this r? @petrochenkov maybe |
|
@bors r+ |
|
📌 Commit 3918b82 has been approved by |
…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.
|
☀️ Test successful - checks-actions |
|
Following up on #79721 this also seems to have performance issues (albeit with the clap benchmark showing improvement). |
|
Given @wesleywiser's comment on #79721, it seems like regressions here are totally acceptable. |
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.