Skip to content

Commit 90aec13

Browse files
committed
commit rustfmt stump in x t tidy even on check
If checking succeeded, it's equivalent to successfully formatting.
1 parent 8934ac5 commit 90aec13

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: src/bootstrap/src/core/build_steps/format.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ pub fn format(build: &Builder<'_>, check: bool, all: bool, paths: &[PathBuf]) {
336336
crate::exit!(1);
337337
}
338338

339-
if !check {
340-
update_rustfmt_version(build);
341-
}
339+
// Update `build/.rustfmt-stamp`, allowing this code to ignore files which have not been changed
340+
// since last merge.
341+
//
342+
// NOTE: Because of the exit above, this is only reachable if formatting / format checking
343+
// succeeded. So we are not commiting the version if formatting was not good.
344+
update_rustfmt_version(build);
342345
}

0 commit comments

Comments
 (0)