We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90d0d70 commit ab976a4Copy full SHA for ab976a4
compiler/rustc_hir/src/definitions.rs
@@ -124,7 +124,9 @@ impl DefKey {
124
pub(crate) fn compute_stable_hash(&self, parent: DefPathHash) -> DefPathHash {
125
let mut hasher = StableHasher::new();
126
127
- parent.hash(&mut hasher);
+ // The new path is in the same crate as `parent`, and will contain the stable_crate_id.
128
+ // Therefore, we only need to include information of the parent's local hash.
129
+ parent.local_hash().hash(&mut hasher);
130
131
let DisambiguatedDefPathData { ref data, disambiguator } = self.disambiguated_data;
132
0 commit comments