Skip to content

Commit c18c7c7

Browse files
committed
Remove redundant assignment
`crate.name` is already set by `tcx.crate_name`, there's no need to override it.
1 parent f76ecd0 commit c18c7c7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/librustdoc/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -519,17 +519,12 @@ fn main_options(options: config::Options) -> MainResult {
519519
// compiler all the way through the analysis passes. The rustdoc output is
520520
// then generated from the cleaned AST of the crate. This runs all the
521521
// plug/cleaning passes.
522-
let crate_name = options.crate_name.clone();
523522
let crate_version = options.crate_version.clone();
524523
let output_format = options.output_format;
525524
let (mut krate, renderinfo, renderopts, sess) = core::run_core(options);
526525

527526
info!("finished with rustc");
528527

529-
if let Some(name) = crate_name {
530-
krate.name = name
531-
}
532-
533528
krate.version = crate_version;
534529

535530
if show_coverage {

0 commit comments

Comments
 (0)