Skip to content

Commit 4c8bb79

Browse files
committed
Auto merge of rust-lang#113697 - GuillaumeGomez:rm-unneeded-externallocation-handling, r=lqd
Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context Should fix perf regression introduced in rust-lang#113623. r? `@lqd`
2 parents 425726d + 1fa8b9a commit 4c8bb79

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/librustdoc/html/render/context.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,7 @@ impl<'tcx> Context<'tcx> {
349349
let e = ExternalCrate { crate_num: cnum };
350350
(e.name(self.tcx()), e.src_root(self.tcx()))
351351
}
352-
ExternalLocation::Unknown => {
353-
let e = ExternalCrate { crate_num: cnum };
354-
let name = e.name(self.tcx());
355-
root = name.to_string();
356-
(name, e.src_root(self.tcx()))
357-
}
352+
ExternalLocation::Unknown => return None,
358353
};
359354

360355
let href = RefCell::new(PathBuf::new());

0 commit comments

Comments
 (0)