Skip to content

Commit 00ce6dc

Browse files
committed
Only cache local adt_def results on disk
An `AdtDef` contains `Span`s, and we don't appear to actually encode the `SourceFile` for foreign spans in the incremental cache in some cases.
1 parent 70fba90 commit 00ce6dc

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ rustc_queries! {
522522
}
523523
query adt_def(key: DefId) -> &'tcx ty::AdtDef {
524524
desc { |tcx| "computing ADT definition for `{}`", tcx.def_path_str(key) }
525-
cache_on_disk_if { true }
525+
cache_on_disk_if { key.is_local() }
526526
separate_provide_extern
527527
}
528528
query adt_destructor(key: DefId) -> Option<ty::Destructor> {

0 commit comments

Comments
 (0)