Skip to content

Commit 07e614b

Browse files
authored
Merge pull request #2817 from dtolnay/corenet
Delete doc(cfg) attribute from impls that are supported in no-std
2 parents b4f860e + b1f899f commit 07e614b

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

serde/src/de/impls.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,6 @@ macro_rules! deserialize_enum {
17171717
}
17181718

17191719
#[cfg(any(feature = "std", not(no_core_net)))]
1720-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
17211720
impl<'de> Deserialize<'de> for net::IpAddr {
17221721
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
17231722
where
@@ -1738,13 +1737,11 @@ impl<'de> Deserialize<'de> for net::IpAddr {
17381737

17391738
parse_ip_impl! {
17401739
#[cfg(any(feature = "std", not(no_core_net)))]
1741-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
17421740
net::Ipv4Addr, "IPv4 address", 4
17431741
}
17441742

17451743
parse_ip_impl! {
17461744
#[cfg(any(feature = "std", not(no_core_net)))]
1747-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
17481745
net::Ipv6Addr, "IPv6 address", 16
17491746
}
17501747

@@ -1771,7 +1768,6 @@ macro_rules! parse_socket_impl {
17711768
}
17721769

17731770
#[cfg(any(feature = "std", not(no_core_net)))]
1774-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
17751771
impl<'de> Deserialize<'de> for net::SocketAddr {
17761772
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
17771773
where
@@ -1792,14 +1788,12 @@ impl<'de> Deserialize<'de> for net::SocketAddr {
17921788

17931789
parse_socket_impl! {
17941790
#[cfg(any(feature = "std", not(no_core_net)))]
1795-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
17961791
net::SocketAddrV4, "IPv4 socket address",
17971792
|(ip, port)| net::SocketAddrV4::new(ip, port),
17981793
}
17991794

18001795
parse_socket_impl! {
18011796
#[cfg(any(feature = "std", not(no_core_net)))]
1802-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
18031797
net::SocketAddrV6, "IPv6 socket address",
18041798
|(ip, port)| net::SocketAddrV6::new(ip, port, 0, 0),
18051799
}

serde/src/ser/impls.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,6 @@ macro_rules! serialize_display_bounded_length {
784784
}
785785

786786
#[cfg(any(feature = "std", not(no_core_net)))]
787-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
788787
impl Serialize for net::IpAddr {
789788
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
790789
where
@@ -855,7 +854,6 @@ fn test_format_u8() {
855854
}
856855

857856
#[cfg(any(feature = "std", not(no_core_net)))]
858-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
859857
impl Serialize for net::Ipv4Addr {
860858
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
861859
where
@@ -880,7 +878,6 @@ impl Serialize for net::Ipv4Addr {
880878
}
881879

882880
#[cfg(any(feature = "std", not(no_core_net)))]
883-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
884881
impl Serialize for net::Ipv6Addr {
885882
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
886883
where
@@ -897,7 +894,6 @@ impl Serialize for net::Ipv6Addr {
897894
}
898895

899896
#[cfg(any(feature = "std", not(no_core_net)))]
900-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
901897
impl Serialize for net::SocketAddr {
902898
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
903899
where
@@ -922,7 +918,6 @@ impl Serialize for net::SocketAddr {
922918
}
923919

924920
#[cfg(any(feature = "std", not(no_core_net)))]
925-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
926921
impl Serialize for net::SocketAddrV4 {
927922
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
928923
where
@@ -939,7 +934,6 @@ impl Serialize for net::SocketAddrV4 {
939934
}
940935

941936
#[cfg(any(feature = "std", not(no_core_net)))]
942-
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
943937
impl Serialize for net::SocketAddrV6 {
944938
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
945939
where

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy