-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc and linking to stdlib docs #35183
Comments
Half dup of #1998 |
Update: Thanks to #43348, the Windows docs are now hosted on rust-lang.org, and https://doc.rust-lang.org/nightly/std/os/windows/io/trait.AsRawSocket.html is searchable and linkable. However, the other half of the issue (about local |
@QuietMisdreavus I think it sounds interesting. I opened an issue at rust-lang/cargo#6279 to track the feature request. Feel free to add to it or correct anything that I may have misinterpreted. The team is currently doing long-term planning and may be a little busy in the short term, and I'm not aware of anyone who would push it forward right now. But we can definitely talk about it more. |
There is now an experimental flag in cargo called [doc.extern-map]
std = "local" More details in the docs: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-map |
Closing this in favor of rust-lang/cargo#8296, rustdoc can't do this on its own. |
rustup doc
is great and works wonderfully.cargo doc
and viewing local docs, any links to stdlib types are redirected to the rust-lang.org hosted docs, and so links to Windows-only types are404 not found
Problem: How to view the correct version of stdlib docs?
For example, reading the docs for AsRawFd you see this:
But if you try to search for
AsRawSocket
, there are no results, which is kinda frustrating.So my first thought was: how to remove the frustration of Unix-only docs on rust-lang.org? I don't have a proposal for this yet.
But my second thought was this: If rustup knows the path to the stdlib docs, could this path be passed to rustdoc, so that rustdoc can use local stdlib docs, instead of rust-lang.org docs? This should be an optional mode, since a very common use case is to use rustdoc to generated docs to be hosted somewhere (like github pages), and in this case, linking to rust-lang.org docs would make more sense.
What do you all think?
The text was updated successfully, but these errors were encountered: