about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jnelson@cloudflare.com>2022-03-30 17:17:31 -0500
committerJoshua Nelson <jnelson@cloudflare.com>2022-03-30 18:01:37 -0500
commit43c16acc275df22c5bb66da5220a3d774d34db66 (patch)
tree427d69533221e06a654ce3194a82f4dc3e2c64e4
parent50d1ee90e786c04e3751f7603dc581598c230f03 (diff)
downloadrust-43c16acc275df22c5bb66da5220a3d774d34db66.tar.gz
rust-43c16acc275df22c5bb66da5220a3d774d34db66.zip
Remove dead code in `doc.rs`
`run` is never called for invalid paths; they get filtered out by `should_run`.
-rw-r--r--src/bootstrap/doc.rs21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 1bb71e734f1..7e40bdc4a39 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -618,20 +618,13 @@ impl Step for Rustc {
             }
         } else {
             for root_crate_path in paths {
-                if !root_crate_path.exists() {
-                    builder.info(&format!(
-                        "\tskipping - {} (unknown compiler crate)",
-                        root_crate_path.display()
-                    ));
-                } else {
-                    let root_crate = builder.crate_paths[root_crate_path];
-                    compiler_crates.extend(
-                        builder
-                            .in_tree_crates(&root_crate, Some(target))
-                            .into_iter()
-                            .map(|krate| krate.name),
-                    );
-                }
+                let root_crate = builder.crate_paths[root_crate_path];
+                compiler_crates.extend(
+                    builder
+                        .in_tree_crates(&root_crate, Some(target))
+                        .into_iter()
+                        .map(|krate| krate.name),
+                );
             }
         }