Skip to content

Commit c21c67e

Browse files
authored
Enable doc_cfg and doc_auto_cfg features on docs.rs (#80)
1 parent 411edef commit c21c67e

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ jobs:
8787
run: rustup update nightly && rustup default nightly
8888
- run: cargo doc --no-deps --all-features
8989
env:
90-
RUSTDOCFLAGS: -Dwarnings
90+
RUSTDOCFLAGS: -Dwarnings --cfg docsrs

valuable/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ criterion = "0.3"
2727
[[bench]]
2828
name = "structable"
2929
harness = false
30+
31+
[package.metadata.docs.rs]
32+
all-features = true
33+
rustdoc-args = ["--cfg", "docsrs"]

valuable/src/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@
9696
//! ```
9797
9898
#![cfg_attr(not(feature = "std"), no_std)]
99+
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg, doc_cfg_hide))]
100+
#![cfg_attr(
101+
docsrs,
102+
doc(cfg_hide(
103+
not(valuable_no_atomic_cas),
104+
not(valuable_no_atomic),
105+
not(valuable_no_atomic_64)
106+
))
107+
)]
99108

100109
#[cfg(feature = "alloc")]
101110
extern crate alloc;
@@ -134,4 +143,4 @@ mod visit;
134143
pub use visit::{visit, Visit};
135144

136145
#[cfg(feature = "derive")]
137-
pub use valuable_derive::*;
146+
pub use valuable_derive::Valuable;

0 commit comments

Comments
 (0)