diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-14 17:04:29 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-07-14 17:04:29 +0200 |
| commit | 1fa8b9aa567a0311b02caadffebb8a8dbffc90e2 (patch) | |
| tree | 3272b90eeb2ab4fa9dd0b5c62ec2c9abc957f0d3 | |
| parent | bacf5bcbc7dae526872cf6af3fc0064a51b1efa2 (diff) | |
| download | rust-1fa8b9aa567a0311b02caadffebb8a8dbffc90e2.tar.gz rust-1fa8b9aa567a0311b02caadffebb8a8dbffc90e2.zip | |
Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index d0a1e223eb8..aa72af001df 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -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()); |
