-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explicitly link to external ena
docs
#88813
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Hm, maybe we should just remove the no-deps flag in rustc docs generation? As far as I can tell, there's no real reason for that exclusion, so we can probably just drop that which would probably fix all these links? |
I've now tried diff --git a/library/backtrace b/library/backtrace
--- a/library/backtrace
+++ b/library/backtrace
@@ -1 +1 @@
-Subproject commit 4f925f8d81dfa57067537217e501e1dff7433491
+Subproject commit 4f925f8d81dfa57067537217e501e1dff7433491-dirty
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index c8714117930..b12bd43ab29 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -590,10 +590,16 @@ fn run(self, builder: &Builder<'_>) {
cargo.rustdocflag("-Znormalize-docs");
cargo.rustdocflag("--show-type-layout");
@@ -590,10 +590,15 @@ fn run(self, builder: &Builder<'_>) {
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");
+ cargo.arg(r#"--config=doc.extern-map.registries.crates-io="https://docs.rs""#);
// Find dependencies for top level crates.
let mut compiler_crates = HashSet::new(); with this |
Hmm ok - cargo is trying to pass the flags, I see
@ehuss what do you think about including the transitive dependencies in the command line? Would it help if rustc exposed a list of crates which have re-exported types? |
In the meantime, @lcnr I agree with Mark that just removing |
Hmm, ok - I still am not in favor of special casing ena though, since there are probably a lot of other broken links we just haven't noticed yet. Could you add both -Zrustdoc-map and the --extern-html-root-url=ena=... that you have now? That should take care of the vast majority of these issues, and then we can add more special cases as necessary. |
Looks great, thanks! @bors r+ rollup |
📌 Commit 03f9fe2 has been approved by |
explicitly link to external `ena` docs we currently do not link to the docs of `ena`: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtInner.html#method.const_unification_table
explicitly link to external `ena` docs we currently do not link to the docs of `ena`: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtInner.html#method.const_unification_table
…arth Rollup of 7 pull requests Successful merges: - rust-lang#88336 ( Detect stricter constraints on gats where clauses in impls vs trait) - rust-lang#88677 (rustc: Remove local variable IDs from `Export`s) - rust-lang#88699 (Remove extra unshallow from cherry-pick checker) - rust-lang#88709 (generic_const_exprs: use thir for abstract consts instead of mir) - rust-lang#88711 (Rework DepthFirstSearch API) - rust-lang#88810 (rustdoc: Cleanup `clean` part 1) - rust-lang#88813 (explicitly link to external `ena` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
we currently do not link to the docs of
ena
: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/infer/struct.InferCtxtInner.html#method.const_unification_table