add a comment about counting zero bytes

This commit is contained in:
Yoshiki Matsuda 2022-06-05 22:26:20 +09:00
parent ad55481043
commit 3e309350d2

View File

@ -735,6 +735,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
if tcx.sess.meta_stats() {
self.opaque.flush();
// Rewind and re-read all the metadata to count the zero bytes we wrote.
let pos_before_rewind = self.opaque.file().stream_position().unwrap();
let mut zero_bytes = 0;
self.opaque.file().rewind().unwrap();