cargo doc
breaks links to dependencies with the same name but different versions
#15299
Labels
cargo doc
breaks links to dependencies with the same name but different versions
#15299
Problem
When a crate depends on different versions of another crate,
cargo doc
documents only one version of the dependency. This makes it impossible for docstrings to link to other versions of the dependency, and leads to #6313 .I've uploaded a repo with a minimal reproduction: https://github.com/ianrrees/cargo-doc-bug
Steps
cargo doc --open
mylib
, however the link tomylib_1::divide
actually goes to documentation for v2.Possible Solution(s)
It appears that
cargo doc
generates documentation for each crate under a subdirectory simply based on the crate name, perhaps adding a layer of directories for the version could both resolve this issue, and prevent duplicate documentation from being generated.Notes
No response
Version
The text was updated successfully, but these errors were encountered: