about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2024-08-27 16:31:40 -0400
committerbinarycat <binarycat@envs.net>2024-08-27 16:31:40 -0400
commitcea707d96033d5e14d3c2b287b0bedd2847db680 (patch)
treef9f21ff4567cfdbbf74f7869beb692364647a597
parent94e9c4cd64f9f30e46be5a149f90205d7096c104 (diff)
downloadrust-cea707d96033d5e14d3c2b287b0bedd2847db680.tar.gz
rust-cea707d96033d5e14d3c2b287b0bedd2847db680.zip
emit old upstream warning no matter the build step
-rw-r--r--src/bootstrap/src/core/build_steps/format.rs4
-rw-r--r--src/bootstrap/src/core/sanity.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/format.rs b/src/bootstrap/src/core/build_steps/format.rs
index 1e78583476a..91fbc57429a 100644
--- a/src/bootstrap/src/core/build_steps/format.rs
+++ b/src/bootstrap/src/core/build_steps/format.rs
@@ -7,7 +7,7 @@ use std::sync::mpsc::SyncSender;
 use std::sync::Mutex;
 
 use build_helper::ci::CiEnv;
-use build_helper::git::{get_git_modified_files, warn_old_master_branch};
+use build_helper::git::get_git_modified_files;
 use ignore::WalkBuilder;
 
 use crate::core::builder::Builder;
@@ -93,8 +93,6 @@ fn get_modified_rs_files(build: &Builder<'_>) -> Result<Option<Vec<String>>, Str
     if !verify_rustfmt_version(build) {
         return Ok(None);
     }
-    warn_old_master_branch(&build.config.git_config(), &build.config.src)
-        .map_err(|e| e.to_string())?;
     get_git_modified_files(&build.config.git_config(), Some(&build.config.src), &["rs"])
 }
 
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
index c42d4c56c38..37b88ca4fa5 100644
--- a/src/bootstrap/src/core/sanity.rs
+++ b/src/bootstrap/src/core/sanity.rs
@@ -15,6 +15,8 @@ use std::ffi::{OsStr, OsString};
 use std::path::PathBuf;
 use std::{env, fs};
 
+use build_helper::git::warn_old_master_branch;
+
 #[cfg(not(feature = "bootstrap-self-test"))]
 use crate::builder::Builder;
 use crate::builder::Kind;
@@ -379,4 +381,8 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
     if let Some(ref s) = build.config.ccache {
         cmd_finder.must_have(s);
     }
+
+    warn_old_master_branch(&build.config.git_config(), &build.config.src)
+        .map_err(|e| e.to_string())
+        .unwrap();
 }