From b307014d488ede48a70b85c5941a47d2c6fa7480 Mon Sep 17 00:00:00 2001 From: ltdk Date: Tue, 18 Jul 2023 20:58:35 -0400 Subject: [PATCH] Link methods in From impls --- library/core/src/net/ip_addr.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index d3f9834dc95..56460c75eba 100644 --- a/library/core/src/net/ip_addr.rs +++ b/library/core/src/net/ip_addr.rs @@ -1120,6 +1120,7 @@ impl Ord for Ipv4Addr { #[stable(feature = "ip_u32", since = "1.1.0")] impl From for u32 { + /// Uses [`Ipv4Addr::to_bits`] to convert an IPv4 address to a host byte order `u32`. #[inline] fn from(ip: Ipv4Addr) -> u32 { ip.to_bits() @@ -1128,6 +1129,7 @@ impl From for u32 { #[stable(feature = "ip_u32", since = "1.1.0")] impl From for Ipv4Addr { + /// Uses [`Ipv4Addr::from_bits`] to convert a host byte order `u32` into an IPv4 address. #[inline] fn from(ip: u32) -> Ipv4Addr { Ipv4Addr::from_bits(ip) @@ -1995,6 +1997,7 @@ impl Ord for Ipv6Addr { #[stable(feature = "i128", since = "1.26.0")] impl From for u128 { + /// Uses [`Ipv6Addr::to_bits`] to convert an IPv6 address to a host byte order `u128`. #[inline] fn from(ip: Ipv6Addr) -> u128 { ip.to_bits() @@ -2002,6 +2005,7 @@ impl From for u128 { } #[stable(feature = "i128", since = "1.26.0")] impl From for Ipv6Addr { + /// Uses [`Ipv6Addr::from_bits`] to convert a host byte order `u128` to an IPv6 address. #[inline] fn from(ip: u128) -> Ipv6Addr { Ipv6Addr::from_bits(ip)