Skip to content

Commit

Permalink
Show features on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed May 13, 2021
1 parent 12b3120 commit cb237b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ byteorder = "=1.3"
[package.metadata.docs.rs]
# Enable certain features when building docs for docs.rs
features = ["libm", "serde1", "rayon"]
rustdoc-args = ["--cfg", "doc_cfg"]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --features libm,serde1,rayon --no-deps --open
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
//! [`Histogram10`]: ./struct.Histogram10.html
//! [`Histogram`]: ./trait.Histogram.html

#![cfg_attr(doc_cfg, feature(doc_cfg))]

#![cfg_attr(feature = "cargo-clippy", allow(
clippy::float_cmp,
clippy::suspicious_operation_groupings,
Expand Down

0 comments on commit cb237b3

Please sign in to comment.