Skip to content

Commit 19d4b04

Browse files
committed
Don't link to stable/beta docs for primitives
This has two issues: 1. The test suite is not set up for links that differ based on the channel. This is not a giant deal; it's fixed by jyn514@2a21264. 2. It's inconsistent with non-primitive types, because libstd uses `html_root_url = "rust-lang.org/nightly"`. Fixing this is non-trivial, and the usefulness has also been called into question; see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Rustdoc.20unconditionally.20links.20to.20nightly.20libstd.20docs. To avoid being inconsistent, this reverts linking to beta for now.
1 parent ae8b84b commit 19d4b04

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/clean/types.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,9 @@ impl Item {
517517
Some(ExternalLocation::Remote(ref s)) => {
518518
format!("{}/std/", s.trim_end_matches('/'))
519519
}
520-
Some(ExternalLocation::Unknown) | None => format!(
521-
"https://doc.rust-lang.org/{}/std/",
522-
crate::doc_rust_lang_org_channel(),
523-
),
520+
Some(ExternalLocation::Unknown) | None => {
521+
"https://doc.rust-lang.org/nightly/std/".to_string()
522+
}
524523
};
525524
// This is a primitive so the url is done "by hand".
526525
let tail = fragment.find('#').unwrap_or_else(|| fragment.len());

0 commit comments

Comments
 (0)