Only create OnDiskCache
in incremental compilation mode
This lets us skip doing useless work when we're not in incremental compilation mode.
This commit is contained in:
parent
fe982319aa
commit
d00ed01876
6 changed files with 33 additions and 17 deletions
|
@ -353,7 +353,7 @@ fn add_query_description_impl(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
id: SerializedDepNodeIndex
|
||||
) -> Option<Self::Value> {
|
||||
tcx.queries.on_disk_cache.try_load_query_result(tcx, id)
|
||||
tcx.queries.on_disk_cache.as_ref().and_then(|c| c.try_load_query_result(tcx, id))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue