Skip to content

Commit

Permalink
Comment drop_serialized_data.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Aug 28, 2021
1 parent 98007e2 commit bcefd48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_query_impl/src/on_disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ impl<'sess> rustc_middle::ty::OnDiskCache<'sess> for OnDiskCache<'sess> {
}
}

/// 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
Expand Down

0 comments on commit bcefd48

Please sign in to comment.