Skip to content

Commit 8d267db

Browse files
committed
Revert "Add guard to check for local core crate"
This reverts commit ee3a0f8.
1 parent f258d98 commit 8d267db

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/librustdoc/clean/types.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -649,16 +649,14 @@ impl Attributes {
649649
if let Some(ref fragment) = *fragment {
650650
let cache = cache();
651651
let url = match cache.extern_locations.get(krate) {
652-
Some(&(ref krate_name, _, ExternalLocation::Local))
653-
if krate_name == "core" =>
654-
{
652+
Some(&(_, _, ExternalLocation::Local)) => {
655653
let depth = CURRENT_DEPTH.with(|l| l.get());
656654
"../".repeat(depth)
657655
}
658656
Some(&(_, _, ExternalLocation::Remote(ref s))) => s.to_string(),
659-
Some(&(_, _, ExternalLocation::Local))
660-
| Some(&(_, _, ExternalLocation::Unknown))
661-
| None => String::from("https://doc.rust-lang.org/nightly"),
657+
Some(&(_, _, ExternalLocation::Unknown)) | None => {
658+
String::from("https://doc.rust-lang.org/nightly")
659+
}
662660
};
663661
// This is a primitive so the url is done "by hand".
664662
let tail = fragment.find('#').unwrap_or_else(|| fragment.len());

0 commit comments

Comments
 (0)