Skip to content

Commit 3e30935

Browse files
committed
add a comment about counting zero bytes
1 parent ad55481 commit 3e30935

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
735735
if tcx.sess.meta_stats() {
736736
self.opaque.flush();
737737

738+
// Rewind and re-read all the metadata to count the zero bytes we wrote.
738739
let pos_before_rewind = self.opaque.file().stream_position().unwrap();
739740
let mut zero_bytes = 0;
740741
self.opaque.file().rewind().unwrap();

0 commit comments

Comments
 (0)