about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2023-09-14 21:03:30 +0300
committeronur-ozkan <work@onurozkan.dev>2023-09-17 07:50:28 +0300
commit9971008b8d83380797df2ab586fcfcfb04f4cfb9 (patch)
tree597802f72d39f51b5987abb3412bf5ee58095de3 /src/bootstrap/lib.rs
parent12b1784b0b317d0ab65b8dbd4da7a6d31a27d558 (diff)
downloadrust-9971008b8d83380797df2ab586fcfcfb04f4cfb9.tar.gz
rust-9971008b8d83380797df2ab586fcfcfb04f4cfb9.zip
micro-level optimizations for bootstrap
Overall optimizations for bootstrap on conditions, assertions,
trait implementations, etc.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4396bbc51a3..644f61549b8 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -116,7 +116,7 @@ pub const VERSION: usize = 2;
 
 /// Extra --check-cfg to add when building
 /// (Mode restriction, config name, config values (if any))
-const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)] = &[
+const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
     (None, "bootstrap", None),
     (Some(Mode::Rustc), "parallel_compiler", None),
     (Some(Mode::ToolRustc), "parallel_compiler", None),
@@ -1757,10 +1757,11 @@ to download LLVM rather than building it.
         //
         // In these cases we automatically enable Ninja if we find it in the
         // environment.
-        if !self.config.ninja_in_file && self.config.build.contains("msvc") {
-            if cmd_finder.maybe_have("ninja").is_some() {
-                return true;
-            }
+        if !self.config.ninja_in_file
+            && self.config.build.contains("msvc")
+            && cmd_finder.maybe_have("ninja").is_some()
+        {
+            return true;
         }
 
         self.config.ninja_in_file