Skip to content

Commit

Permalink
Merge pull request #2401 from dtolnay/docderive
Browse files Browse the repository at this point in the history
Show derive macros in serde's rustdoc
  • Loading branch information
dtolnay authored Mar 14, 2023
2 parents a38aa31 + fb7b6ea commit 7a8e497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ doc-scrape-examples = false
features = ["derive", "rc"]

[package.metadata.docs.rs]
features = ["derive"]
targets = ["x86_64-unknown-linux-gnu"]


Expand Down
3 changes: 2 additions & 1 deletion serde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ mod std_error;
#[allow(unused_imports)]
#[macro_use]
extern crate serde_derive;

/// Derive macro available if serde is built with `features = ["derive"]`.
#[cfg(feature = "serde_derive")]
#[doc(hidden)]
pub use serde_derive::{Deserialize, Serialize};

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

0 comments on commit 7a8e497

Please sign in to comment.