Decouple the on-disk cache from the query engine.
This commit is contained in:
@@ -125,11 +125,6 @@ rustc_queries! {
|
||||
desc { |tcx| "computing generics of `{}`", tcx.def_path_str(key) }
|
||||
storage(ArenaCacheSelector<'tcx>)
|
||||
cache_on_disk_if { key.is_local() }
|
||||
load_cached(tcx, id) {
|
||||
let generics: Option<ty::Generics> = tcx.queries.on_disk_cache.as_ref()
|
||||
.and_then(|c| c.try_load_query_result(tcx, id));
|
||||
generics
|
||||
}
|
||||
}
|
||||
|
||||
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
|
||||
@@ -702,7 +697,7 @@ rustc_queries! {
|
||||
cache_on_disk_if { true }
|
||||
load_cached(tcx, id) {
|
||||
let typeck_results: Option<ty::TypeckResults<'tcx>> = tcx
|
||||
.queries.on_disk_cache.as_ref()
|
||||
.on_disk_cache.as_ref()
|
||||
.and_then(|c| c.try_load_query_result(tcx, id));
|
||||
|
||||
typeck_results.map(|x| &*tcx.arena.alloc(x))
|
||||
|
||||
Reference in New Issue
Block a user