1
Fork 0

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:
Aaron Hill 2020-11-19 15:49:45 -05:00
parent fe982319aa
commit d00ed01876
No known key found for this signature in database
GPG key ID: B4087E510E98B164
6 changed files with 33 additions and 17 deletions

View file

@ -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))
}
}
};