Show that derives are specific to feature="derive" in documentation

This commit is contained in:
David Tolnay 2023-11-06 08:06:40 -08:00
parent 0726b2c479
commit ce8fef7e0b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -326,6 +326,7 @@ extern crate serde_derive;
/// Derive macro available if serde is built with `features = ["derive"]`.
#[cfg(feature = "serde_derive")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))]
pub use serde_derive::{Deserialize, Serialize};
#[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))]