Skip to content

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

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

Aaron1011
Copy link
Member

Fixes #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.

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.
@rust-highfive
Copy link
Contributor

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 10, 2020
@lcnr
Copy link
Contributor

lcnr commented Dec 10, 2020

don't know enough about this

r? @petrochenkov maybe

@rust-highfive rust-highfive assigned petrochenkov and unassigned lcnr Dec 10, 2020
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 10, 2020

📌 Commit 3918b82 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 10, 2020
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.
@bors
Copy link
Collaborator

bors commented Dec 11, 2020

⌛ Testing commit 3918b82 with merge 19eb1c4...

@bors
Copy link
Collaborator

bors commented Dec 11, 2020

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 19eb1c4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 11, 2020
@bors bors merged commit 19eb1c4 into rust-lang:master Dec 11, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 11, 2020
@jyn514 jyn514 mentioned this pull request Dec 11, 2020
@rylev
Copy link
Member

rylev commented Dec 15, 2020

Following up on #79721 this also seems to have performance issues (albeit with the clap benchmark showing improvement).

@rylev
Copy link
Member

rylev commented Dec 15, 2020

Given @wesleywiser's comment on #79721, it seems like regressions here are totally acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to recover key for type_of with hash
7 participants