From 8486837d557c152fee52383852835d4941602423 Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Fri, 9 Feb 2024 12:27:33 +0100 Subject: [PATCH] Bless the target file instead of the source file --- src/test/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/mod.rs b/src/test/mod.rs index edd68b38a1e..b2b3df8f4ad 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -835,7 +835,7 @@ fn handle_result( // Ignore LF and CRLF difference for Windows. if !string_eq_ignore_newline_repr(&fmt_text, &text) { if std::env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0") { - std::fs::write(file_name, fmt_text).unwrap(); + std::fs::write(target, fmt_text).unwrap(); continue; } let diff = make_diff(&text, &fmt_text, DIFF_CONTEXT_SIZE);