Skip to content

Commit 7a8e497

Browse files
authored
Merge pull request #2401 from dtolnay/docderive
Show derive macros in serde's rustdoc
2 parents a38aa31 + fb7b6ea commit 7a8e497

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

serde/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ doc-scrape-examples = false
2727
features = ["derive", "rc"]
2828

2929
[package.metadata.docs.rs]
30+
features = ["derive"]
3031
targets = ["x86_64-unknown-linux-gnu"]
3132

3233

serde/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ mod std_error;
338338
#[allow(unused_imports)]
339339
#[macro_use]
340340
extern crate serde_derive;
341+
342+
/// Derive macro available if serde is built with `features = ["derive"]`.
341343
#[cfg(feature = "serde_derive")]
342-
#[doc(hidden)]
343344
pub use serde_derive::{Deserialize, Serialize};
344345

345346
#[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))]

0 commit comments

Comments
 (0)