about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src/partitioning
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2022-12-14 20:15:58 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2022-12-14 20:17:52 +0000
commitb720847917c51801f9557a256c35fc669b637126 (patch)
treef9231a3fa70fa7291e8b9fa2f1ffb3b26e0c0879 /compiler/rustc_monomorphize/src/partitioning
parent6379e5e78c3726e2fc570493d42a9bca05f735ee (diff)
wrap output in BufWriter
Diffstat (limited to 'compiler/rustc_monomorphize/src/partitioning')
-rw-r--r--compiler/rustc_monomorphize/src/partitioning/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning/mod.rs b/compiler/rustc_monomorphize/src/partitioning/mod.rs
index fef8c9d1634..38e1d98e44e 100644
--- a/compiler/rustc_monomorphize/src/partitioning/mod.rs
+++ b/compiler/rustc_monomorphize/src/partitioning/mod.rs
@@ -97,7 +97,7 @@ mod merging;
 
 use std::cmp;
 use std::fs::{self, File};
-use std::io::Write;
+use std::io::{BufWriter, Write};
 use std::path::{Path, PathBuf};
 
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
@@ -497,7 +497,8 @@ fn dump_mono_items_stats<'tcx>(
 
     let filename = format!("{}.mono_items.md", crate_name.unwrap_or("unknown-crate"));
     let output_path = output_directory.join(&filename);
-    let mut file = File::create(output_path)?;
+    let file = File::create(output_path)?;
+    let mut file = BufWriter::new(file);
 
     // Gather instantiated mono items grouped by def_id
     let mut items_per_def_id: FxHashMap<_, Vec<_>> = Default::default();