Skip to content

Commit

Permalink
Auto merge of #113697 - GuillaumeGomez:rm-unneeded-externallocation-h…
Browse files Browse the repository at this point in the history
…andling, r=lqd

Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context

Should fix perf regression introduced in #113623.

r? `@lqd`
  • Loading branch information
bors committed Jul 15, 2023
2 parents 425726d + 1fa8b9a commit 4c8bb79
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/librustdoc/html/render/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,7 @@ impl<'tcx> Context<'tcx> {
let e = ExternalCrate { crate_num: cnum };
(e.name(self.tcx()), e.src_root(self.tcx()))
}
ExternalLocation::Unknown => {
let e = ExternalCrate { crate_num: cnum };
let name = e.name(self.tcx());
root = name.to_string();
(name, e.src_root(self.tcx()))
}
ExternalLocation::Unknown => return None,
};

let href = RefCell::new(PathBuf::new());
Expand Down

0 comments on commit 4c8bb79

Please sign in to comment.