cargo
cargo copied to clipboard
Documentation for `documentation` field is misleading
The docs for the documentation field say
If no URL is specified in the manifest file, crates.io will automatically link your crate to the corresponding docs.rs page.
This sounds as if setting no URL is equivalent to setting the docs.rs URL. That is however not the case: in the crates.io search result list, the "Documentation" link will only show up if documentation is explicitly set in the toml file.
I am not sure if this is a bug in the cargo docs or the crates.io frontend, but it is certainly surprising.
Seeing as the individual crate pages will list documentation, I would personally chalk this up as a crates.io bug.
From #11685, my suspicion is that this is either an optimization or an oversight. Apparently, adding the docs.rs link to the crate's page is done via Javascript and I imagine doing that for every crate on a search page might be a bit much.
@rustbot label A-documenting-cargo-itself
This should be reopened since https://github.com/rust-lang/cargo/pull/14562 got reverted.