Closed
Description
Rustdoc can fail if you build documentation with different versions of rustdoc. Rustdoc has some persistent files (like search-index.js
) which are not internally versioned. If the format of these changes, this can cause things to break. Example:
In a project with at least one dependency:
cargo +1.40.0 doc
cargo +1.41.0 doc --no-deps --open
The result will have javascript errors in the console, and the sidebar and search will be broken.
To fix this, Cargo should retain a fingerprint somewhere that tracks the rustc version used when building documentation. Changes to that should cause Cargo to delete the doc
directory.