about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2025-04-15 14:06:51 +0200
committerWaffle Lapkin <waffle.lapkin@gmail.com>2025-04-15 15:02:05 +0200
commit52f4b16075bf01d2c8f8539c26fb9b135967713f (patch)
tree5df37a8b8f1716e03a576848824abd303ad023b1 /src/bootstrap
parent502b630cd1042d8b2b613a12278a01c641cf096a (diff)
downloadrust-52f4b16075bf01d2c8f8539c26fb9b135967713f.tar.gz
rust-52f4b16075bf01d2c8f8539c26fb9b135967713f.zip
use helper function instead of writing rustfmt stamp by hand
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/format.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/format.rs b/src/bootstrap/src/core/build_steps/format.rs
index b1a97bde97b..43b831adf1f 100644
--- a/src/bootstrap/src/core/build_steps/format.rs
+++ b/src/bootstrap/src/core/build_steps/format.rs
@@ -81,7 +81,8 @@ fn update_rustfmt_version(build: &Builder<'_>) {
     let Some((version, stamp_file)) = get_rustfmt_version(build) else {
         return;
     };
-    t!(std::fs::write(stamp_file.path(), version))
+
+    t!(stamp_file.add_stamp(version).write());
 }
 
 /// Returns the Rust files modified between the `merge-base` of HEAD and