about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMatt Horn <mathphreak@gmail.com>2016-07-07 11:15:25 -0600
committerMatt Horn <mathphreak@gmail.com>2016-07-07 11:15:25 -0600
commit58da5dd51eebe700a2ac8cf4f0b10dec6d1b6ca9 (patch)
tree281e8165469eb93352197797fc65e1741e6b623b /src/libstd
parentfee5b492fecd321b5ce507d732948943a74fbf4c (diff)
downloadrust-58da5dd51eebe700a2ac8cf4f0b10dec6d1b6ca9.tar.gz
rust-58da5dd51eebe700a2ac8cf4f0b10dec6d1b6ca9.zip
Add links to Ipv*Addr methods in docs
per https://github.com/rust-lang/rust/pull/34694#issuecomment-231126489
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/net/ip.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs
index 2bf063099e4..fddb237dd5f 100644
--- a/src/libstd/net/ip.rs
+++ b/src/libstd/net/ip.rs
@@ -60,7 +60,9 @@ pub enum Ipv6MulticastScope {
 }
 
 impl IpAddr {
-    /// Returns true for the special 'unspecified' address (0.0.0.0 in IPv4, :: in IPv6).
+    /// Returns true for the special 'unspecified' address ([IPv4], [IPv6]).
+    /// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_unspecified
+    /// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_unspecified
     #[unstable(feature="ip", issue="27709",
                reason="recently added and depends on unstable Ipv4Addr.is_unspecified()")]
     pub fn is_unspecified(&self) -> bool {
@@ -70,7 +72,9 @@ impl IpAddr {
         }
     }
 
-    /// Returns true if this is a loopback address (127.0.0.0/8 in IPv4, ::1 in IPv6).
+    /// Returns true if this is a loopback address ([IPv4], [IPv6]).
+    /// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_loopback
+    /// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_loopback
     #[unstable(feature="ip", reason="recently added", issue="27709")]
     pub fn is_loopback(&self) -> bool {
         match *self {
@@ -79,7 +83,9 @@ impl IpAddr {
         }
     }
 
-    /// Returns true if the address appears to be globally routable.
+    /// Returns true if the address appears to be globally routable ([IPv4], [IPv6]).
+    /// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_global
+    /// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_global
     #[unstable(feature="ip", issue="27709",
                reason="recently added and depends on unstable Ip{v4,v6}Addr.is_global()")]
     pub fn is_global(&self) -> bool {
@@ -89,7 +95,9 @@ impl IpAddr {
         }
     }
 
-    /// Returns true if this is a multicast address (224.0.0.0/4 in IPv4, ff00::/8 in IPv6)
+    /// Returns true if this is a multicast address ([IPv4], [IPv6]).
+    /// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_multicast
+    /// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_multicast
     #[unstable(feature="ip", reason="recently added", issue="27709")]
     pub fn is_multicast(&self) -> bool {
         match *self {
@@ -98,7 +106,9 @@ impl IpAddr {
         }
     }
 
-    /// Returns true if this address is in a range designated for documentation.
+    /// Returns true if this address is in a range designated for documentation ([IPv4], [IPv6]).
+    /// [IPv4]: ../../std/net/struct.Ipv4Addr.html#method.is_documentation
+    /// [IPv6]: ../../std/net/struct.Ipv6Addr.html#method.is_documentation
     #[unstable(feature="ip", issue="27709",
                reason="recently added and depends on unstable Ipv6Addr.is_documentation()")]
     pub fn is_documentation(&self) -> bool {