From 43c16acc275df22c5bb66da5220a3d774d34db66 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Wed, 30 Mar 2022 17:17:31 -0500 Subject: [PATCH] Remove dead code in `doc.rs` `run` is never called for invalid paths; they get filtered out by `should_run`. --- src/bootstrap/doc.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 1bb71e734f19..7e40bdc4a394 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), + ); } }