]> git.lizzy.rs Git - rust.git/commitdiff
Comment drop_serialized_data.
authorCamille GILLOT <gillot.camille@gmail.com>
Sat, 28 Aug 2021 19:49:51 +0000 (21:49 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Sat, 28 Aug 2021 19:49:51 +0000 (21:49 +0200)
compiler/rustc_query_impl/src/on_disk_cache.rs

index c197962fabbefd9f390a2baf9ded08672c15ecff..5c2803c67e73fca87c75741741946820689356e2 100644 (file)
@@ -246,6 +246,11 @@ fn new_empty(source_map: &'sess SourceMap) -> Self {
         }
     }
 
+    /// Execute all cache promotions and release the serialized backing Mmap.
+    ///
+    /// Cache promotions require invoking queries, which needs to read the serialized data.
+    /// In order to serialize the new on-disk cache, the former on-disk cache file needs to be
+    /// deleted, hence we won't be able to refer to its memmapped data.
     fn drop_serialized_data(&self, tcx: TyCtxt<'tcx>) {
         // Register any dep nodes that we reused from the previous session,
         // but didn't `DepNode::construct` in this session. This ensures