diff --git a/Cargo.toml b/Cargo.toml index bcb1e77..99dd035 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ nightly_const_generics = [] experimental_write_impl = [] [package.metadata.docs.rs] -all-features = true +features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"] rustdoc-args = ["--cfg","docs_rs"] [profile.test] diff --git a/src/arrayvec.rs b/src/arrayvec.rs index 0804005..43db194 100644 --- a/src/arrayvec.rs +++ b/src/arrayvec.rs @@ -145,6 +145,7 @@ impl> IndexMut for ArrayVec { } #[cfg(feature = "serde")] +#[cfg_attr(docs_rs, doc(cfg(feature = "serde")))] impl Serialize for ArrayVec where A::Item: Serialize, @@ -163,6 +164,7 @@ where } #[cfg(feature = "serde")] +#[cfg_attr(docs_rs, doc(cfg(feature = "serde")))] impl<'de, A: Array> Deserialize<'de> for ArrayVec where A::Item: Deserialize<'de>, diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 6e8b923..447cc73 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -142,6 +142,7 @@ impl> IndexMut for TinyVec { } #[cfg(feature = "serde")] +#[cfg_attr(docs_rs, doc(cfg(feature = "serde")))] impl Serialize for TinyVec where A::Item: Serialize, @@ -160,6 +161,7 @@ where } #[cfg(feature = "serde")] +#[cfg_attr(docs_rs, doc(cfg(feature = "serde")))] impl<'de, A: Array> Deserialize<'de> for TinyVec where A::Item: Deserialize<'de>,