Description
- Observation: Running
rustup doc
is great and works wonderfully. - Observation: The docs hosted on rust-lang.org are Unix only. Windows-only types are no-where to be found.
- Observation: After running
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:
This is only available on unix platforms and must be imported in order to call the method. Windows platforms have a corresponding
AsRawHandle
andAsRawSocket
set of traits.
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?