1
Fork 0

Use def_path_hash_to_def_id when re-using a RawDefId

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.
This commit is contained in:
Aaron Hill 2020-12-10 15:27:07 -05:00
parent d32c320d7e
commit 3918b82993
No known key found for this signature in database
GPG key ID: B4087E510E98B164
5 changed files with 32 additions and 6 deletions

View file

@ -596,9 +596,9 @@ impl<K: DepKind> DepGraph<K> {
// an eval_always node, let's try to mark it green recursively.
if !dep_dep_node.kind.is_eval_always() {
debug!(
"try_mark_previous_green({:?}) --- state of dependency {:?} \
"try_mark_previous_green({:?}) --- state of dependency {:?} ({}) \
is unknown, trying to mark it green",
dep_node, dep_dep_node
dep_node, dep_dep_node, dep_dep_node.hash,
);
let node_index = self.try_mark_previous_green(