Fix broken links using rustdoc nightly

Uses cross-crate documentation links so that rustdoc does the hard work
of making relative links for us.

Requires nightly version of rustdoc in order to generate links based on
path names, see
https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
for details.
This commit is contained in:
Joshua Nelson
2019-08-16 10:38:37 -04:00
committed by Benjamin Bouvier
parent 19257f80c1
commit bf77985e25
5 changed files with 11 additions and 7 deletions

View File

@@ -49,7 +49,11 @@ RUST_BACKTRACE=1 cargo test --all
# Make sure the documentation builds.
banner "Rust documentation: $topdir/target/doc/cranelift/index.html"
cargo doc
cargo +nightly doc
# Make sure the documentation doesn't have broken links.
banner "Rust documentation link test"
find ./target/doc -maxdepth 1 -type d -name "cranelift*" | xargs -I{} cargo deadlinks --dir {}
# Ensure fuzzer works by running it with a single input
# Note LSAN is disabled due to https://github.com/google/sanitizers/issues/764