]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_incremental/assert_dep_graph.rs
Auto merge of #69555 - Centril:rollup-e53lxz4, r=Centril
[rust.git] / src / librustc_incremental / assert_dep_graph.rs
index 9490128e32d6a3e6eed9edcb46c2e0dc2f89a939..51cc091b6c0af24285afe2452559b9aa3127c4fd 100644 (file)
@@ -49,7 +49,7 @@
 
 use std::env;
 use std::fs::{self, File};
-use std::io::Write;
+use std::io::{BufWriter, Write};
 
 pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
     tcx.dep_graph.with_ignore(|| {
@@ -235,7 +235,7 @@ fn dump_graph(tcx: TyCtxt<'_>) {
     {
         // dump a .txt file with just the edges:
         let txt_path = format!("{}.txt", path);
-        let mut file = File::create(&txt_path).unwrap();
+        let mut file = BufWriter::new(File::create(&txt_path).unwrap());
         for &(ref source, ref target) in &edges {
             write!(file, "{:?} -> {:?}\n", source, target).unwrap();
         }