1
Fork 0

Move def_path_hash_to_def_id to rustc_middle.

This commit is contained in:
Camille GILLOT 2021-10-16 17:13:02 +02:00
parent 88c6d3de95
commit e53404cca6
3 changed files with 23 additions and 28 deletions

View file

@ -338,11 +338,7 @@ impl DepNodeExt for DepNode {
/// has been removed.
fn extract_def_id(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> {
if self.kind.fingerprint_style() == FingerprintStyle::DefPathHash {
Some(
tcx.on_disk_cache
.as_ref()?
.def_path_hash_to_def_id(tcx, DefPathHash(self.hash.into())),
)
Some(tcx.def_path_hash_to_def_id(DefPathHash(self.hash.into())))
} else {
None
}