File tree 1 file changed +4
-1
lines changed
compiler/rustc_middle/src/query
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ pub struct OnDiskCache<'sess> {
95
95
// we try to map an `ExpnHash` to its value in the current
96
96
// compilation session.
97
97
foreign_expn_data : UnhashMap < ExpnHash , u32 > ,
98
+ has_cache : bool ,
98
99
}
99
100
100
101
// This type is used only for serialization and deserialization.
@@ -194,6 +195,7 @@ impl<'sess> OnDiskCache<'sess> {
194
195
expn_data : footer. expn_data ,
195
196
foreign_expn_data : footer. foreign_expn_data ,
196
197
hygiene_context : Default :: default ( ) ,
198
+ has_cache : true ,
197
199
}
198
200
}
199
201
@@ -211,11 +213,12 @@ impl<'sess> OnDiskCache<'sess> {
211
213
expn_data : UnhashMap :: default ( ) ,
212
214
foreign_expn_data : UnhashMap :: default ( ) ,
213
215
hygiene_context : Default :: default ( ) ,
216
+ has_cache : false ,
214
217
}
215
218
}
216
219
217
220
pub fn has_cache ( & self ) -> bool {
218
- self . serialized_data . read ( ) . is_some ( )
221
+ self . has_cache
219
222
}
220
223
221
224
/// Execute all cache promotions and release the serialized backing Mmap.
You can’t perform that action at this time.
0 commit comments