about summary refs log tree commit diff
path: root/src/bootstrap/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/check.rs')
-rw-r--r--src/bootstrap/check.rs29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 7a8bfb2d5d8..0d38d2eebe7 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -44,7 +44,13 @@ impl Step for Std {
         let target = self.target;
         let compiler = builder.compiler(0, builder.config.build);
 
-        let mut cargo = builder.cargo(compiler, Mode::Std, target, cargo_subcommand(builder.kind));
+        let mut cargo = builder.cargo(
+            compiler,
+            Mode::Std,
+            SourceType::InTree,
+            target,
+            cargo_subcommand(builder.kind),
+        );
         std_cargo(builder, target, compiler.stage, &mut cargo);
 
         builder.info(&format!("Checking std artifacts ({} -> {})", &compiler.host, target));
@@ -92,8 +98,13 @@ impl Step for Rustc {
 
         builder.ensure(Std { target });
 
-        let mut cargo =
-            builder.cargo(compiler, Mode::Rustc, target, cargo_subcommand(builder.kind));
+        let mut cargo = builder.cargo(
+            compiler,
+            Mode::Rustc,
+            SourceType::InTree,
+            target,
+            cargo_subcommand(builder.kind),
+        );
         rustc_cargo(builder, &mut cargo, target);
 
         builder.info(&format!("Checking compiler artifacts ({} -> {})", &compiler.host, target));
@@ -113,7 +124,7 @@ impl Step for Rustc {
 }
 
 macro_rules! tool_check_step {
-    ($name:ident, $path:expr) => {
+    ($name:ident, $path:expr, $source_type:expr) => {
         #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
         pub struct $name {
             pub target: Interned<String>,
@@ -145,7 +156,7 @@ macro_rules! tool_check_step {
                     target,
                     cargo_subcommand(builder.kind),
                     $path,
-                    SourceType::InTree,
+                    $source_type,
                     &[],
                 );
 
@@ -184,8 +195,12 @@ macro_rules! tool_check_step {
     };
 }
 
-tool_check_step!(Rustdoc, "src/tools/rustdoc");
-tool_check_step!(Clippy, "src/tools/clippy");
+tool_check_step!(Rustdoc, "src/tools/rustdoc", SourceType::InTree);
+// Clippy is a hybrid. It is an external tool, but uses a git subtree instead
+// of a submodule. Since the SourceType only drives the deny-warnings
+// behavior, treat it as in-tree so that any new warnings in clippy will be
+// rejected.
+tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
 
 /// Cargo's output path for the standard library in a given stage, compiled
 /// by a particular compiler for the specified target.