mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-09 20:11:01 +00:00
Merge pull request #2817 from dtolnay/corenet
Delete doc(cfg) attribute from impls that are supported in no-std
This commit is contained in:
@@ -1717,7 +1717,6 @@ macro_rules! deserialize_enum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl<'de> Deserialize<'de> for net::IpAddr {
|
impl<'de> Deserialize<'de> for net::IpAddr {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
where
|
where
|
||||||
@@ -1738,13 +1737,11 @@ impl<'de> Deserialize<'de> for net::IpAddr {
|
|||||||
|
|
||||||
parse_ip_impl! {
|
parse_ip_impl! {
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
net::Ipv4Addr, "IPv4 address", 4
|
net::Ipv4Addr, "IPv4 address", 4
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_ip_impl! {
|
parse_ip_impl! {
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
net::Ipv6Addr, "IPv6 address", 16
|
net::Ipv6Addr, "IPv6 address", 16
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1771,7 +1768,6 @@ macro_rules! parse_socket_impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl<'de> Deserialize<'de> for net::SocketAddr {
|
impl<'de> Deserialize<'de> for net::SocketAddr {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
where
|
where
|
||||||
@@ -1792,14 +1788,12 @@ impl<'de> Deserialize<'de> for net::SocketAddr {
|
|||||||
|
|
||||||
parse_socket_impl! {
|
parse_socket_impl! {
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
net::SocketAddrV4, "IPv4 socket address",
|
net::SocketAddrV4, "IPv4 socket address",
|
||||||
|(ip, port)| net::SocketAddrV4::new(ip, port),
|
|(ip, port)| net::SocketAddrV4::new(ip, port),
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_socket_impl! {
|
parse_socket_impl! {
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
net::SocketAddrV6, "IPv6 socket address",
|
net::SocketAddrV6, "IPv6 socket address",
|
||||||
|(ip, port)| net::SocketAddrV6::new(ip, port, 0, 0),
|
|(ip, port)| net::SocketAddrV6::new(ip, port, 0, 0),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -784,7 +784,6 @@ macro_rules! serialize_display_bounded_length {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::IpAddr {
|
impl Serialize for net::IpAddr {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
@@ -855,7 +854,6 @@ fn test_format_u8() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::Ipv4Addr {
|
impl Serialize for net::Ipv4Addr {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
@@ -880,7 +878,6 @@ impl Serialize for net::Ipv4Addr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::Ipv6Addr {
|
impl Serialize for net::Ipv6Addr {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
@@ -897,7 +894,6 @@ impl Serialize for net::Ipv6Addr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::SocketAddr {
|
impl Serialize for net::SocketAddr {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
@@ -922,7 +918,6 @@ impl Serialize for net::SocketAddr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::SocketAddrV4 {
|
impl Serialize for net::SocketAddrV4 {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
@@ -939,7 +934,6 @@ impl Serialize for net::SocketAddrV4 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(any(feature = "std", not(no_core_net)))))]
|
|
||||||
impl Serialize for net::SocketAddrV6 {
|
impl Serialize for net::SocketAddrV6 {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user