Skip to content

Commit

Permalink
Enable documentation on docs.rs for items behind feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
aloucks authored and ctz committed Feb 20, 2020
1 parent f6d3551 commit 98d88f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rustls/Cargo.toml
Expand Up @@ -48,3 +48,7 @@ path = "examples/internal/bench.rs"
name = "benchmarks"
path = "tests/benchmarks.rs"
harness = false

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
6 changes: 6 additions & 0 deletions rustls/src/lib.rs
Expand Up @@ -199,6 +199,9 @@
// underneath.
#![cfg_attr(feature = "cargo-clippy", allow(clippy::ptr_arg))]

// Enable documentation for all features on docs.rs
#![cfg_attr(docsrs, feature(doc_cfg))]

// log for logging (optional).
#[cfg(feature = "logging")]
use log;
Expand Down Expand Up @@ -283,6 +286,7 @@ pub use crate::vecbuf::{WriteV, WriteVAdapter};
pub mod sign;

#[cfg(feature = "quic")]
#[cfg_attr(docsrs, doc(cfg(feature = "quic")))]
/// APIs for implementing QUIC TLS
pub mod quic;

Expand All @@ -296,8 +300,10 @@ mod quic {
}

#[cfg(feature = "dangerous_configuration")]
#[cfg_attr(docsrs, doc(cfg(feature = "dangerous_configuration")))]
pub use crate::verify::{ServerCertVerifier, ServerCertVerified,
ClientCertVerifier, ClientCertVerified, WebPKIVerifier};
#[cfg(feature = "dangerous_configuration")]
#[cfg_attr(docsrs, doc(cfg(feature = "dangerous_configuration")))]
pub use crate::client::danger::DangerousClientConfig;

0 comments on commit 98d88f9

Please sign in to comment.