]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/builder.rs
Rollup merge of #95401 - c410-f3r:moar-tests, r=petrochenkov
[rust.git] / src / bootstrap / builder.rs
index 1903f0baef1fae4d71a8f0ce3210e3a7e334965b..e7511888114234e49c877f2815f110fbbf5f0704 100644 (file)
@@ -169,7 +169,7 @@ fn empty() -> PathSet {
 
     fn one<P: Into<PathBuf>>(path: P, kind: Kind) -> PathSet {
         let mut set = BTreeSet::new();
-        set.insert(TaskPath { path: path.into(), kind: Some(kind.into()) });
+        set.insert(TaskPath { path: path.into(), kind: Some(kind) });
         PathSet::Set(set)
     }
 
@@ -231,10 +231,10 @@ fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
         }
 
         if !builder.config.exclude.is_empty() {
-            eprintln!(
+            builder.verbose(&format!(
                 "{:?} not skipped for {:?} -- not in {:?}",
                 pathset, self.name, builder.config.exclude
-            );
+            ));
         }
         false
     }
@@ -372,10 +372,7 @@ pub fn path(self, path: &str) -> Self {
     // multiple aliases for the same job
     pub fn paths(mut self, paths: &[&str]) -> Self {
         self.paths.insert(PathSet::Set(
-            paths
-                .iter()
-                .map(|p| TaskPath { path: p.into(), kind: Some(self.kind.into()) })
-                .collect(),
+            paths.iter().map(|p| TaskPath { path: p.into(), kind: Some(self.kind) }).collect(),
         ));
         self
     }
@@ -388,8 +385,7 @@ pub fn is_suite_path(&self, path: &Path) -> Option<&PathSet> {
     }
 
     pub fn suite_path(mut self, suite: &str) -> Self {
-        self.paths
-            .insert(PathSet::Suite(TaskPath { path: suite.into(), kind: Some(self.kind.into()) }));
+        self.paths.insert(PathSet::Suite(TaskPath { path: suite.into(), kind: Some(self.kind) }));
         self
     }
 
@@ -1009,7 +1005,7 @@ pub fn cargo(
             // the rustc_llvm cache. That will always work, even though it
             // may mean that on the next non-check build we'll need to rebuild
             // rustc_llvm. But if LLVM is stale, that'll be a tiny amount
-            // of work comparitively, and we'd likely need to rebuild it anyway,
+            // of work comparatively, and we'd likely need to rebuild it anyway,
             // so that's okay.
             if crate::native::prebuilt_llvm_config(self, target).is_err() {
                 cargo.env("RUST_CHECK", "1");
@@ -1101,7 +1097,12 @@ pub fn cargo(
             // cargo.arg("-Zcheck-cfg-features");
 
             // Enable cfg checking of rustc well-known names
-            rustflags.arg("-Zunstable-options").arg("--check-cfg=names()");
+            rustflags
+                .arg("-Zunstable-options")
+                // Enable checking of well known names
+                .arg("--check-cfg=names()")
+                // Enable checking of well known values
+                .arg("--check-cfg=values()");
 
             // Add extra cfg not defined in rustc
             for (restricted_mode, name, values) in EXTRA_CHECK_CFGS {
@@ -1769,7 +1770,7 @@ pub(crate) fn was_invoked_explicitly<S: Step>(&'a self, kind: Kind) -> bool {
             if should_run.paths.iter().any(|s| s.has(path, Some(desc.kind)))
                 && !desc.is_excluded(
                     self,
-                    &PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind.into()) }),
+                    &PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind) }),
                 )
             {
                 return true;
@@ -1794,7 +1795,7 @@ fn new(target: TargetSelection) -> Rustflags {
     }
 
     /// By default, cargo will pick up on various variables in the environment. However, bootstrap
-    /// reuses those variables to pass additional flags to rustdoc, so by default they get overriden.
+    /// reuses those variables to pass additional flags to rustdoc, so by default they get overridden.
     /// Explicitly add back any previous value in the environment.
     ///
     /// `prefix` is usually `RUSTFLAGS` or `RUSTDOCFLAGS`.