From c18c7c7059cb1c63aad9892ecbed58c229c74098 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Mon, 14 Dec 2020 22:28:24 -0500 Subject: [PATCH] Remove redundant assignment `crate.name` is already set by `tcx.crate_name`, there's no need to override it. --- src/librustdoc/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 94b6617a071a..24045b4e29dc 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -519,17 +519,12 @@ fn main_options(options: config::Options) -> MainResult { // compiler all the way through the analysis passes. The rustdoc output is // then generated from the cleaned AST of the crate. This runs all the // plug/cleaning passes. - let crate_name = options.crate_name.clone(); let crate_version = options.crate_version.clone(); let output_format = options.output_format; let (mut krate, renderinfo, renderopts, sess) = core::run_core(options); info!("finished with rustc"); - if let Some(name) = crate_name { - krate.name = name - } - krate.version = crate_version; if show_coverage {