diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-07-27 12:32:22 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-07-27 14:06:27 +0000 |
| commit | 656213cc83537c311d8bcfd0b8f2c68fe1594233 (patch) | |
| tree | b9818b9036f5847c4bca8da41a8ce6b4f53e8484 /compiler/rustc_errors/src | |
| parent | c06b2b9117d015bc0e6ce9a989435b6a47dfb339 (diff) | |
| download | rust-656213cc83537c311d8bcfd0b8f2c68fe1594233.tar.gz rust-656213cc83537c311d8bcfd0b8f2c68fe1594233.zip | |
When flushing delayed span bugs, write to the ICE dump file even if it doesn't exist
Fix #113881.
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 1da02e1bb01..9772c5b8c15 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1673,11 +1673,11 @@ impl HandlerInner { let backtrace = std::env::var_os("RUST_BACKTRACE").map_or(true, |x| &x != "0"); for bug in bugs { if let Some(file) = self.ice_file.as_ref() - && let Ok(mut out) = std::fs::File::options().append(true).open(file) + && let Ok(mut out) = std::fs::File::options().create(true).append(true).open(file) { let _ = write!( &mut out, - "\n\ndelayed span bug: {}\n{}", + "delayed span bug: {}\n{}\n", bug.inner.styled_message().iter().filter_map(|(msg, _)| msg.as_str()).collect::<String>(), &bug.note ); |
