Skip to content

Commit 2efc800

Browse files
Merge pull request #21021 from A4-Tacks/lib-smol_str-doc-feature
Fix removed feature `doc_auto_cfg` for smol_str lib
2 parents 260f94c + 48dbd84 commit 2efc800

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/smol_str/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2+
#![cfg_attr(docsrs, feature(doc_cfg))]
33

44
extern crate alloc;
55

@@ -333,6 +333,7 @@ impl AsRef<[u8]> for SmolStr {
333333
}
334334

335335
#[cfg(feature = "std")]
336+
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
336337
impl AsRef<std::ffi::OsStr> for SmolStr {
337338
#[inline(always)]
338339
fn as_ref(&self) -> &std::ffi::OsStr {
@@ -341,6 +342,7 @@ impl AsRef<std::ffi::OsStr> for SmolStr {
341342
}
342343

343344
#[cfg(feature = "std")]
345+
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
344346
impl AsRef<std::path::Path> for SmolStr {
345347
#[inline(always)]
346348
fn as_ref(&self) -> &std::path::Path {
@@ -941,6 +943,7 @@ impl From<SmolStrBuilder> for SmolStr {
941943
}
942944

943945
#[cfg(feature = "arbitrary")]
946+
#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))]
944947
impl<'a> arbitrary::Arbitrary<'a> for SmolStr {
945948
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> Result<Self, arbitrary::Error> {
946949
let s = <&str>::arbitrary(u)?;
@@ -949,8 +952,10 @@ impl<'a> arbitrary::Arbitrary<'a> for SmolStr {
949952
}
950953

951954
#[cfg(feature = "borsh")]
955+
#[cfg_attr(docsrs, doc(cfg(feature = "borsh")))]
952956
mod borsh;
953957
#[cfg(feature = "serde")]
958+
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
954959
mod serde;
955960

956961
#[test]

0 commit comments

Comments
 (0)