File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/rustc_middle/src/query Expand file tree Collapse file tree 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> {
9595 // we try to map an `ExpnHash` to its value in the current
9696 // compilation session.
9797 foreign_expn_data : UnhashMap < ExpnHash , u32 > ,
98+ has_cache : bool ,
9899}
99100
100101// This type is used only for serialization and deserialization.
@@ -194,6 +195,7 @@ impl<'sess> OnDiskCache<'sess> {
194195 expn_data : footer. expn_data ,
195196 foreign_expn_data : footer. foreign_expn_data ,
196197 hygiene_context : Default :: default ( ) ,
198+ has_cache : true ,
197199 }
198200 }
199201
@@ -211,11 +213,12 @@ impl<'sess> OnDiskCache<'sess> {
211213 expn_data : UnhashMap :: default ( ) ,
212214 foreign_expn_data : UnhashMap :: default ( ) ,
213215 hygiene_context : Default :: default ( ) ,
216+ has_cache : false ,
214217 }
215218 }
216219
217220 pub fn has_cache ( & self ) -> bool {
218- self . serialized_data . read ( ) . is_some ( )
221+ self . has_cache
219222 }
220223
221224 /// Execute all cache promotions and release the serialized backing Mmap.
You can’t perform that action at this time.
0 commit comments