Skip to content

Commit bcefd48

Browse files
committed
Comment drop_serialized_data.
1 parent 98007e2 commit bcefd48

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_query_impl/src/on_disk_cache.rs

+5
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> {
246246
}
247247
}
248248

249+
/// Execute all cache promotions and release the serialized backing Mmap.
250+
///
251+
/// Cache promotions require invoking queries, which needs to read the serialized data.
252+
/// In order to serialize the new on-disk cache, the former on-disk cache file needs to be
253+
/// deleted, hence we won't be able to refer to its memmapped data.
249254
fn drop_serialized_data(&self, tcx: TyCtxt<'tcx>) {
250255
// Register any dep nodes that we reused from the previous session,
251256
// but didn't `DepNode::construct` in this session. This ensures

0 commit comments

Comments
 (0)