blob: 514806045f28025e12ada86d8a45010882f14afa [file] [log] [blame]
#!/usr/bin/env bash
set -eux
cd $(dirname $0)
if [ -s NIGHTLY_TOOLCHAIN ]; then
rustup run $NIGHTLY_TOOLCHAIN cargo doc
else
cargo doc
fi;
# cargo-deadlinks will check any links in docs generated by `cargo doc`.
# This is useful as rustdoc uses raw links which are error prone.
command -v cargo-deadlinks &> /dev/null &&
cargo deadlinks
cd -