Skip to content

Commit

Permalink
Only cache local adt_def results on disk
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Aaron1011 committed Dec 16, 2021
1 parent 70fba90 commit 00ce6dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ rustc_queries! {
}
query adt_def(key: DefId) -> &'tcx ty::AdtDef {
desc { |tcx| "computing ADT definition for `{}`", tcx.def_path_str(key) }
cache_on_disk_if { true }
cache_on_disk_if { key.is_local() }
separate_provide_extern
}
query adt_destructor(key: DefId) -> Option<ty::Destructor> {
Expand Down

0 comments on commit 00ce6dc

Please sign in to comment.