Merge pull request #2401 from dtolnay/docderive

Show derive macros in serde's rustdoc
This commit is contained in:
David Tolnay 2023-03-14 00:37:06 -07:00 committed by GitHub
commit 7a8e4977e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ doc-scrape-examples = false
features = ["derive", "rc"]
[package.metadata.docs.rs]
features = ["derive"]
targets = ["x86_64-unknown-linux-gnu"]

View File

@ -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")))]