Skip to content

Commit

Permalink
Merge pull request #12 from p2pderivatives/chore/rust-bitcoin-prep-ad…
Browse files Browse the repository at this point in the history
…d-cfg-docsrs

Add rustdoc build to CI script
  • Loading branch information
Tibo-lg authored Dec 23, 2022
2 parents 8890410 + 72af05a commit 3a04149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ if [ "$DO_LINT" = true ]
then
cargo clippy --all-features --all-targets -- -D warnings
fi

# Build the docs if told to (this only works with the nightly toolchain)
if [ "$DO_DOCS" = true ]; then
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --all-features -- -D rustdoc::broken-intra-doc-links -D warnings || exit 1
fi
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#![deny(unused_mut)]
#![deny(missing_docs)]

// Experimental features we need.
#![cfg_attr(docsrs, feature(doc_cfg))]

use std::cmp::Reverse;

#[cfg(any(test, feature = "rand"))]
Expand Down

0 comments on commit 3a04149

Please sign in to comment.