about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshument <74075169+Joshument@users.noreply.github.com>2022-10-01 18:51:10 -0400
committerJoshument <74075169+Joshument@users.noreply.github.com>2022-10-01 19:32:37 -0400
commit8bba0de693a3279b00eb682775e490c8bf3fef6d (patch)
tree5946a875c212e0845d7045e4e4ec3f5a2927f533
parent56a35bc906be1250a76fdb9a4b70e9261e10aec5 (diff)
downloadrust-8bba0de693a3279b00eb682775e490c8bf3fef6d.tar.gz
rust-8bba0de693a3279b00eb682775e490c8bf3fef6d.zip
fix issue with x.py setup running into explicit panic
-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 cb18e14fa36..d8ae517cfef 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -654,8 +654,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 {
@@ -670,6 +668,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) {