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

This commit is contained in:
Guillaume Gomez
2023-07-14 17:04:29 +02:00
parent bacf5bcbc7
commit 1fa8b9aa56
+1 -6
View File
@@ -349,12 +349,7 @@ pub(crate) fn href_from_span(&self, span: clean::Span, with_lines: bool) -> Opti
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());