]> git.lizzy.rs Git - rust.git/commitdiff
Do not store crate in latest_foreign_def_path_hashes.
authorCamille GILLOT <gillot.camille@gmail.com>
Sun, 30 May 2021 20:32:22 +0000 (22:32 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Wed, 9 Jun 2021 18:23:46 +0000 (20:23 +0200)
compiler/rustc_middle/src/ty/query/on_disk_cache.rs

index a74a40102a80d0f345d350a9afe0ce24567945ad..30e44e8b70a182fd642ca997d91f9ac339dce3da 100644 (file)
@@ -1023,13 +1023,6 @@ impl<'a, 'tcx, E> Encodable<CacheEncoder<'a, 'tcx, E>> for CrateNum
 {
     fn encode(&self, s: &mut CacheEncoder<'a, 'tcx, E>) -> Result<(), E::Error> {
         let def_path_hash = s.tcx.def_path_hash(self.as_def_id());
-        // Store additional information when we encode a foreign `DefId`,
-        // so that we can map its `DefPathHash` back to a `DefId` in the next
-        // compilation session.
-        if *self != LOCAL_CRATE {
-            s.latest_foreign_def_path_hashes
-                .insert(def_path_hash, RawDefId { krate: self.as_u32(), index: 0 });
-        }
         def_path_hash.stable_crate_id().encode(s)
     }
 }