about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-07-14 17:04:29 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-07-14 17:04:29 +0200
commit1fa8b9aa567a0311b02caadffebb8a8dbffc90e2 (patch)
tree3272b90eeb2ab4fa9dd0b5c62ec2c9abc957f0d3 /src/librustdoc/html/render
parentbacf5bcbc7dae526872cf6af3fc0064a51b1efa2 (diff)
downloadrust-1fa8b9aa567a0311b02caadffebb8a8dbffc90e2.tar.gz
rust-1fa8b9aa567a0311b02caadffebb8a8dbffc90e2.zip
Remove unneeded handling for `ExternalLocation::Unknown` in rustdoc render context
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/context.rs7
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());