From 03f9fe2f2fa2555b0598a80a3c4ad135ca2a4368 Mon Sep 17 00:00:00 2001 From: lcnr Date: Sat, 11 Sep 2021 20:24:46 +0200 Subject: [PATCH] explicitly link to external `ena` docs --- src/bootstrap/doc.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index c871411793073..fbc7f19cb731c 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -590,10 +590,18 @@ impl Step for Rustc { cargo.rustdocflag("-Znormalize-docs"); cargo.rustdocflag("--show-type-layout"); compile::rustc_cargo(builder, &mut cargo, target); + cargo.arg("-Zunstable-options"); cargo.arg("-Zskip-rustdoc-fingerprint"); // Only include compiler crates, no dependencies of those, such as `libc`. + // Do link to dependencies on `docs.rs` however using `rustdoc-map`. cargo.arg("--no-deps"); + cargo.arg("-Zrustdoc-map"); + + // FIXME: `-Zrustdoc-map` does not yet correctly work for transitive dependencies, + // once this is no longer an issue the special case for `ena` can be removed. + cargo.rustdocflag("--extern-html-root-url"); + cargo.rustdocflag("ena=https://docs.rs/ena/latest/"); // Find dependencies for top level crates. let mut compiler_crates = HashSet::new();