File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/rustc_middle/src/ty/query Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ impl<'sess> OnDiskCache<'sess> {
475475 }
476476
477477 /// If the given `dep_node`'s hash still exists in the current compilation,
478- /// calls `store_foreign_def_id` with its current `DefId` .
478+ /// and its current `DefId` is foreign, calls `store_foreign_def_id` with it .
479479 ///
480480 /// Normally, `store_foreign_def_id_hash` can be called directly by
481481 /// the dependency graph when we construct a `DepNode`. However,
@@ -497,7 +497,9 @@ impl<'sess> OnDiskCache<'sess> {
497497 // changed in the current compilation session (e.g. we've added/removed crates,
498498 // or added/removed definitions before/after the target definition).
499499 if let Some ( def_id) = self . def_path_hash_to_def_id ( tcx, hash) {
500- self . store_foreign_def_id_hash ( def_id, hash) ;
500+ if !def_id. is_local ( ) {
501+ self . store_foreign_def_id_hash ( def_id, hash) ;
502+ }
501503 }
502504 }
503505 }
You can’t perform that action at this time.
0 commit comments