about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2020-07-29 12:26:15 -0400
committerAaron Hill <aa1ronham@gmail.com>2020-11-25 14:49:15 -0500
commite935d3832cd8f0c3c3e1f01864e2605a3818b9d9 (patch)
tree03fe22697c443d5a5308d6bae7cafbc88fcc2035 /compiler/rustc_incremental/src
parentdb79d2f63780613e700cb58b4339c48287555ae0 (diff)
downloadrust-e935d3832cd8f0c3c3e1f01864e2605a3818b9d9.tar.gz
rust-e935d3832cd8f0c3c3e1f01864e2605a3818b9d9.zip
Lazy DefPath decoding for incremental compilation
Diffstat (limited to 'compiler/rustc_incremental/src')
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index 201f381f889..8c9099ffd02 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -1,6 +1,7 @@
 //! Code to save/load the dep-graph from files.
 
 use rustc_data_structures::fx::FxHashMap;
+use rustc_hir::definitions::Definitions;
 use rustc_middle::dep_graph::{PreviousDepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
 use rustc_middle::ty::query::OnDiskCache;
 use rustc_middle::ty::TyCtxt;
@@ -204,7 +205,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
 /// If we are not in incremental compilation mode, returns `None`.
 /// Otherwise, tries to load the query result cache from disk,
 /// creating an empty cache if it could not be loaded.
-pub fn load_query_result_cache(sess: &Session) -> Option<OnDiskCache<'_>> {
+pub fn load_query_result_cache<'a>(sess: &'a Session, definitions: &Definitions) -> Option<OnDiskCache<'a>> {
     if sess.opts.incremental.is_none() {
         return None;
     }
@@ -216,9 +217,7 @@ pub fn load_query_result_cache(sess: &Session) -> Option<OnDiskCache<'_>> {
         &query_cache_path(sess),
         sess.is_nightly_build(),
     ) {
-        LoadResult::Ok { data: (bytes, start_pos) } => {
-            Some(OnDiskCache::new(sess, bytes, start_pos))
-        }
+        LoadResult::Ok { data: (bytes, start_pos) } => Some(OnDiskCache::new(sess, bytes, start_pos, definitions)),
         _ => Some(OnDiskCache::new_empty(sess.source_map())),
     }
 }