about summary refs log tree commit diff
path: root/compiler/rustc_incremental
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-03-30 18:17:14 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-05-02 18:00:20 +0200
commit0447f91e10d4f95ef2ff35b253e1964ed7c5f9fc (patch)
tree7a29f37d68c81f480fc92f22182aab373b22aed6 /compiler/rustc_incremental
parent18d1b3f3ebb8a5c5fb9a58122f6eaab63d09ec4e (diff)
downloadrust-0447f91e10d4f95ef2ff35b253e1964ed7c5f9fc.tar.gz
rust-0447f91e10d4f95ef2ff35b253e1964ed7c5f9fc.zip
Let load_query_result_cache take a &DefPathTable
This allows removing a confusing mem::replace in create_global_ctxt
Diffstat (limited to 'compiler/rustc_incremental')
-rw-r--r--compiler/rustc_incremental/src/persist/load.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_incremental/src/persist/load.rs b/compiler/rustc_incremental/src/persist/load.rs
index 2b5649bb059..74e6e844bd3 100644
--- a/compiler/rustc_incremental/src/persist/load.rs
+++ b/compiler/rustc_incremental/src/persist/load.rs
@@ -1,7 +1,7 @@
 //! Code to save/load the dep-graph from files.
 
 use rustc_data_structures::fx::FxHashMap;
-use rustc_hir::definitions::Definitions;
+use rustc_hir::definitions::DefPathTable;
 use rustc_middle::dep_graph::{PreviousDepGraph, SerializedDepGraph, WorkProduct, WorkProductId};
 use rustc_middle::ty::query::OnDiskCache;
 use rustc_serialize::opaque::Decoder;
@@ -198,7 +198,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
 /// creating an empty cache if it could not be loaded.
 pub fn load_query_result_cache<'a>(
     sess: &'a Session,
-    definitions: &Definitions,
+    def_path_table: &DefPathTable,
 ) -> Option<OnDiskCache<'a>> {
     if sess.opts.incremental.is_none() {
         return None;
@@ -212,7 +212,7 @@ pub fn load_query_result_cache<'a>(
         sess.is_nightly_build(),
     ) {
         LoadResult::Ok { data: (bytes, start_pos) } => {
-            Some(OnDiskCache::new(sess, bytes, start_pos, definitions))
+            Some(OnDiskCache::new(sess, bytes, start_pos, def_path_table))
         }
         _ => Some(OnDiskCache::new_empty(sess.source_map())),
     }