about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4ce09c7eec7..d5bba76e47f 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -656,8 +656,6 @@ impl Build {
             job::setup(self);
         }
 
-        // Download rustfmt early so that it can be used in rust-analyzer configs.
-        let _ = &builder::Builder::new(&self).initial_rustfmt();
         self.maybe_update_submodules();
 
         if let Subcommand::Format { check, paths } = &self.config.cmd {
@@ -672,6 +670,9 @@ impl Build {
             return setup::setup(&self.config, *profile);
         }
 
+        // Download rustfmt early so that it can be used in rust-analyzer configs.
+        let _ = &builder::Builder::new(&self).initial_rustfmt();
+
         {
             let builder = builder::Builder::new(&self);
             if let Some(path) = builder.paths.get(0) {