Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upLink no-deps documentation with no html_root_url to docs.rs by default #42301
Comments
steveklabnik
added
T-rustdoc
T-dev-tools
labels
May 30, 2017
Mark-Simulacrum
added
the
C-feature-request
label
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
I tried to look into this, but I couldn't figure out how to get the crate versions. The best I managed to do was linking to Any other ideas? |
This comment has been minimized.
This comment has been minimized.
natemara
commented
Dec 11, 2018
|
It seems like possibly, rustdoc could get the version information from the Cargo.toml of the package, and make a request to |
dtolnay commentedMay 29, 2017
As of Rust 1.19.0-nightly, documenting a crate with
cargo doc --no-depswill link to the html_root_url of any dependencies that have one set, and other dependencies will not be linked.In the screenshot, the crate providing
HasHtmlRootUrlhas an html_root_url so the type is linked. The crate providingNoHtmlRootUrldoes not have an html_root_url so the type is not linked.Linking
NoHtmlRootUrlto docs.rs would be a reasonable fallback.