Skip to content

Commit 83c3ddb

Browse files
committed
Merge rust-bitcoin/rust-bitcoin#1059: Move broken-intra-doc-link lint config to command line
281af7c Move broken-intra-doc-link lint config to command line (Tobin C. Harding) Pull request description: The docs lint `broken-intra-doc-links` has been changed but the new name is not available in our MSRV, this means we get a build warning. We only build docs with the nightly toolchain so we can move this lint control to the docs build command in `test.sh` instead of doing it crate wide. With this patch applied devs risk not noticing docs link issues until they hit them on CI _if_ they do not build with the test script or explicitly pass in `-- -D rustdoc::broken-intra-doc-links`, which no one is going to do. Hence we add a line to the readme with a shell alias that can be used to check docs, taken directly from `test.sh`. ACKs for top commit: apoelstra: ACK 281af7c Kixunil: ACK 281af7c Tree-SHA512: 7c9be3bcf097444a107199c9e9df62324d80b770659556a81eca160b807245e15921cda812f83e8b24d41716273704ff7b78be9300680f1efef3cb1fbffe6afd
2 parents 6fbe648 + 10e6aff commit 83c3ddb

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ cargo test
101101

102102
Please refer to the [`cargo` documentation](https://doc.rust-lang.org/stable/cargo/) for more detailed instructions.
103103

104+
### Building the docs
105+
106+
We build docs with the nightly toolchain, you may wish to use the following
107+
shell alias to check your documentation changes build correctly.
108+
109+
```alias build-docs='RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features="$FEATURES" -- -D rustdoc::broken-intra-doc-links'```
110+
104111
## Pull Requests
105112

106113
Every PR needs at least two reviews to get merged. During the review phase

contrib/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ done
5656

5757
# Build the docs if told to (this only works with the nightly toolchain)
5858
if [ "$DO_DOCS" = true ]; then
59-
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
59+
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features="$FEATURES" -- -D rustdoc::broken-intra-doc-links
6060
fi
6161

6262
# Fuzz if told to

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#![deny(unused_imports)]
5858
#![deny(missing_docs)]
5959
#![deny(unused_must_use)]
60-
#![deny(broken_intra_doc_links)]
6160

6261
#[cfg(not(any(feature = "std", feature = "no-std")))]
6362
compile_error!("at least one of the `std` or `no-std` features must be enabled");

0 commit comments

Comments
 (0)