diff options
| author | Josh Stone <jistone@redhat.com> | 2024-09-24 14:25:16 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2024-09-24 14:25:16 -0700 |
| commit | 0999b019f8e0a96ca7aac9fd5ec095d59b0806ec (patch) | |
| tree | 6bba5c63e251caa7a1aa28b8636324b620fc483c /compiler/rustc_middle | |
| parent | 1e9a50dde8fe417348a9e4c74787975527502ec3 (diff) | |
| download | rust-0999b019f8e0a96ca7aac9fd5ec095d59b0806ec.tar.gz rust-0999b019f8e0a96ca7aac9fd5ec095d59b0806ec.zip | |
Dogfood `feature(file_buffered)`
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/pretty.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 23cd247e884..a32b19b067a 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -45,6 +45,7 @@ #![feature(discriminant_kind)] #![feature(extern_types)] #![feature(extract_if)] +#![feature(file_buffered)] #![feature(if_let_guard)] #![feature(intra_doc_pointers)] #![feature(iter_from_coroutine)] diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 119aed1106d..48789565218 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -277,9 +277,9 @@ pub fn create_dump_file<'tcx>( ) })?; } - Ok(io::BufWriter::new(fs::File::create(&file_path).map_err(|e| { + Ok(fs::File::create_buffered(&file_path).map_err(|e| { io::Error::new(e.kind(), format!("IO error creating MIR dump file: {file_path:?}; {e}")) - })?)) + })?) } /////////////////////////////////////////////////////////////////////////// |
