Decouple the on-disk cache from the query engine.
This commit is contained in:
parent
49c1b07a9e
commit
dab9b89221
7 changed files with 20 additions and 31 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue