diff --git a/doc.sh b/doc.sh index 4c20b7a..5148060 100755 --- a/doc.sh +++ b/doc.sh @@ -4,7 +4,11 @@ set -eux cd $(dirname $0) -rustup run $NIGHTLY_TOOLCHAIN cargo doc +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.