Skip to content

Commit

Permalink
Revert "Add guard to check for local core crate"
Browse files Browse the repository at this point in the history
This reverts commit ee3a0f8.
  • Loading branch information
sethp committed Jul 7, 2020
1 parent f258d98 commit 8d267db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,16 +649,14 @@ impl Attributes {
if let Some(ref fragment) = *fragment {
let cache = cache();
let url = match cache.extern_locations.get(krate) {
Some(&(ref krate_name, _, ExternalLocation::Local))
if krate_name == "core" =>
{
Some(&(_, _, ExternalLocation::Local)) => {
let depth = CURRENT_DEPTH.with(|l| l.get());
"../".repeat(depth)
}
Some(&(_, _, ExternalLocation::Remote(ref s))) => s.to_string(),
Some(&(_, _, ExternalLocation::Local))
| Some(&(_, _, ExternalLocation::Unknown))
| None => String::from("https://doc.rust-lang.org/nightly"),
Some(&(_, _, ExternalLocation::Unknown)) | None => {
String::from("https://doc.rust-lang.org/nightly")
}
};
// This is a primitive so the url is done "by hand".
let tail = fragment.find('#').unwrap_or_else(|| fragment.len());
Expand Down

0 comments on commit 8d267db

Please sign in to comment.