diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/serde/src/de/impls.rs | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/serde/src/de/impls.rs')
-rw-r--r-- | vendor/serde/src/de/impls.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/serde/src/de/impls.rs b/vendor/serde/src/de/impls.rs index a257d9e2f..a2e2c4856 100644 --- a/vendor/serde/src/de/impls.rs +++ b/vendor/serde/src/de/impls.rs @@ -666,10 +666,10 @@ impl<'de: 'a, 'a> Deserialize<'de> for &'a [u8] { //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "std")] +#[cfg(any(feature = "std", all(not(no_core_cstr), feature = "alloc")))] struct CStringVisitor; -#[cfg(feature = "std")] +#[cfg(any(feature = "std", all(not(no_core_cstr), feature = "alloc")))] impl<'de> Visitor<'de> for CStringVisitor { type Value = CString; @@ -720,7 +720,7 @@ impl<'de> Visitor<'de> for CStringVisitor { } } -#[cfg(feature = "std")] +#[cfg(any(feature = "std", all(not(no_core_cstr), feature = "alloc")))] impl<'de> Deserialize<'de> for CString { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where @@ -747,7 +747,10 @@ macro_rules! forwarded_impl { } } -#[cfg(all(feature = "std", not(no_de_boxed_c_str)))] +#[cfg(all( + any(feature = "std", all(not(no_core_cstr), feature = "alloc")), + not(no_de_boxed_c_str) +))] forwarded_impl!((), Box<CStr>, CString::into_boxed_c_str); #[cfg(not(no_core_reverse))] |