Skip to content

Commit d2e5e37

Browse files
authored
Merge pull request #111 from umgefahren/add-doc-auto-cfg
chore: Add doc auto cfg to show features in the documentation
2 parents acb4df7 + 30838ff commit d2e5e37

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,10 @@ quickcheck = { version = "1.0.3", default-features = false }
3232
rand = "0.8.4"
3333
serde_json = "1.0"
3434

35+
# Passing arguments to the docsrs builder in order to properly document cfg's.
36+
# More information: https://docs.rs/about/builds#cross-compiling
37+
[package.metadata.docs.rs]
38+
all-features = true
39+
3540
[lints.rust]
3641
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] }

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Implementation of [multiaddr](https://github.com/multiformats/multiaddr) in Rust.
2+
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
23

34
pub use multihash;
45

0 commit comments

Comments
 (0)