Skip to content

Commit cbad6f1

Browse files
committed
Auto merge of rust-lang#123880 - saethlin:sync-on-finish, r=<try>
Call File::sync_all when finalizing encoding rust-lang#123352 (comment) r? `@ghost`
2 parents 9782770 + ecd7070 commit cbad6f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/rustc_serialize/src/opaque.rs

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ impl FileEncoder {
178178

179179
pub fn finish(&mut self) -> FileEncodeResult {
180180
self.flush();
181+
if self.res.is_ok() {
182+
self.res = self.file.sync_all();
183+
}
181184
#[cfg(debug_assertions)]
182185
{
183186
self.finished = true;

0 commit comments

Comments
 (0)