@@ -98,7 +98,10 @@ pub struct OnDiskCache<'sess> {
98
98
latest_foreign_def_path_hashes : Lock < FxHashMap < DefPathHash , RawDefId > > ,
99
99
100
100
// Maps `DefPathHashes` to their corresponding `LocalDefId`s for all
101
- // local items in the current compilation session.
101
+ // local items in the current compilation session. This is only populated
102
+ // when we are in incremental mode and have loaded a pre-existing cache
103
+ // from disk, since this map is only used when deserializing a `DefPathHash`
104
+ // from the incremental cache.
102
105
local_def_path_hash_to_def_id : FxHashMap < DefPathHash , LocalDefId > ,
103
106
// Caches all lookups of `DefPathHashes`, both for local and foreign
104
107
// definitions. A definition from the previous compilation session
@@ -215,7 +218,7 @@ impl<'sess> OnDiskCache<'sess> {
215
218
}
216
219
}
217
220
218
- pub fn new_empty ( source_map : & ' sess SourceMap , definitions : & Definitions ) -> Self {
221
+ pub fn new_empty ( source_map : & ' sess SourceMap ) -> Self {
219
222
Self {
220
223
serialized_data : Vec :: new ( ) ,
221
224
file_index_to_stable_id : Default :: default ( ) ,
@@ -232,7 +235,7 @@ impl<'sess> OnDiskCache<'sess> {
232
235
hygiene_context : Default :: default ( ) ,
233
236
foreign_def_path_hashes : Default :: default ( ) ,
234
237
latest_foreign_def_path_hashes : Default :: default ( ) ,
235
- local_def_path_hash_to_def_id : make_local_def_path_hash_map ( definitions ) ,
238
+ local_def_path_hash_to_def_id : Default :: default ( ) ,
236
239
def_path_hash_to_def_id_cache : Default :: default ( ) ,
237
240
}
238
241
}
0 commit comments