mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Merge pull request #21021 from A4-Tacks/lib-smol_str-doc-feature
Fix removed feature `doc_auto_cfg` for smol_str lib
This commit is contained in:
committed by
Laurențiu Nicola
parent
ef17e58f2e
commit
dde4b6c715
@@ -1,5 +1,5 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
@@ -333,6 +333,7 @@ fn as_ref(&self) -> &[u8] {
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
||||
impl AsRef<std::ffi::OsStr> for SmolStr {
|
||||
#[inline(always)]
|
||||
fn as_ref(&self) -> &std::ffi::OsStr {
|
||||
@@ -341,6 +342,7 @@ fn as_ref(&self) -> &std::ffi::OsStr {
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
|
||||
impl AsRef<std::path::Path> for SmolStr {
|
||||
#[inline(always)]
|
||||
fn as_ref(&self) -> &std::path::Path {
|
||||
@@ -941,6 +943,7 @@ fn from(value: SmolStrBuilder) -> Self {
|
||||
}
|
||||
|
||||
#[cfg(feature = "arbitrary")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "arbitrary")))]
|
||||
impl<'a> arbitrary::Arbitrary<'a> for SmolStr {
|
||||
fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> Result<Self, arbitrary::Error> {
|
||||
let s = <&str>::arbitrary(u)?;
|
||||
@@ -949,8 +952,10 @@ fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> Result<Self, arbitrary::Err
|
||||
}
|
||||
|
||||
#[cfg(feature = "borsh")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "borsh")))]
|
||||
mod borsh;
|
||||
#[cfg(feature = "serde")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
|
||||
mod serde;
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user