Skip to content

Commit 1fa8b9a

Browse files
Remove unneeded handling for ExternalLocation::Unknown in rustdoc render context
1 parent bacf5bc commit 1fa8b9a

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)