zcash_primitives: Add feature flags to docs.rs documentation

This commit is contained in:
Jack Grigg 2020-08-23 06:56:03 +01:00
parent c3d36c94bf
commit a3cb89dff9
4 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,9 @@ readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
[package.metadata.docs.rs]
all-features = true
[dependencies]
aes = "0.5"
blake2b_simd = "0.5"

View File

@ -3,6 +3,7 @@
//! `zcash_primitives` is a library that provides the core structs and functions necessary
//! for working with Zcash.
#![cfg_attr(docsrs, feature(doc_cfg))]
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]

View File

@ -412,6 +412,7 @@ impl<P: consensus::Parameters, R: RngCore + CryptoRng> Builder<P, R> {
/// Adds a transparent coin to be spent in this transaction.
#[cfg(feature = "transparent-inputs")]
#[cfg_attr(docsrs, doc(cfg(feature = "transparent-inputs")))]
pub fn add_transparent_input(
&mut self,
sk: secp256k1::SecretKey,

View File

@ -60,6 +60,7 @@ pub struct TxIn {
impl TxIn {
#[cfg(feature = "transparent-inputs")]
#[cfg_attr(docsrs, doc(cfg(feature = "transparent-inputs")))]
pub fn new(prevout: OutPoint) -> Self {
TxIn {
prevout,