Skip to content

Local rustc-docs could make use of local pages for std types #151496

@rami3l

Description

@rami3l

Posting this for @blyxyas and big thanks for having spotted this issue real quick :)

Location (URL)

The same problem persists in many different pages, just to pick an example on my machine:

$RUSTUP_HOME/toolchains/nightly-aarch64-apple-darwin/share/doc/rust/html/rustc-docs/rustc_trait_selection/errors/struct.AmbiguousImpl.html

Summary

The external link for Option<> is https://doc.rust-lang.org/nightly/core/option/enum.Option.html, which is probably desirable for online usage, but considering the fact that this download is intended for offline usage, it'd be better if it can point to the std docs just next to it, i.e. $RUSTUP_HOME/toolchains/nightly-aarch64-apple-darwin/share/doc/rust/html/std/option/enum.Option.html?

A few things to be noted for this issue:

  1. This issue should be resolved in a way that it doesn't break the online docs.

  2. This does imply an implicit dependency between rustc-docs and rust-docs which rustup is not quite ready to handle, but since rustc-docs is mostly for in-house usage, I believe we can focus on redirecting the links for the time being.

cc @GuillaumeGomez @jieyouxu

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions