diff options
| author | Alexis Bourget <alexis.bourget@gmail.com> | 2020-08-16 14:41:12 +0200 |
|---|---|---|
| committer | Alexis Bourget <alexis.bourget@gmail.com> | 2020-08-16 14:41:12 +0200 |
| commit | 5fc187cd971ef3a4440878916b516e5a5c23ae57 (patch) | |
| tree | 8b8306e1421be44052a9db614c8458ee34e69382 | |
| parent | 15cad1c46555912019615e47bd06cb538dfa7996 (diff) | |
| download | rust-5fc187cd971ef3a4440878916b516e5a5c23ae57.tar.gz rust-5fc187cd971ef3a4440878916b516e5a5c23ae57.zip | |
Fix a link, improve method resolution
| -rw-r--r-- | library/std/src/net/addr.rs | 2 | ||||
| -rw-r--r-- | library/std/src/net/ip.rs | 49 |
2 files changed, 27 insertions, 24 deletions
diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 2c404289b0e..c11049fb981 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -22,6 +22,8 @@ use crate::vec; /// The size of a `SocketAddr` instance may vary depending on the target operating /// system. /// +/// [IP address]: IpAddr +/// /// # Examples /// /// ``` diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index 39d64cf98e0..de28268ea36 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -133,8 +133,8 @@ pub enum Ipv6MulticastScope { impl IpAddr { /// Returns [`true`] for the special 'unspecified' address. /// - /// See the documentation for [`Ipv4Addr::is_unspecified`] and - /// [`Ipv6Addr::is_unspecified`] for more details. + /// See the documentation for [`Ipv4Addr::is_unspecified()`] and + /// [`Ipv6Addr::is_unspecified()`] for more details. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -156,8 +156,8 @@ impl IpAddr { /// Returns [`true`] if this is a loopback address. /// - /// See the documentation for [`Ipv4Addr::is_loopback`] and - /// [`Ipv6Addr::is_loopback`] for more details. + /// See the documentation for [`Ipv4Addr::is_loopback()`] and + /// [`Ipv6Addr::is_loopback()`] for more details. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -179,8 +179,8 @@ impl IpAddr { /// Returns [`true`] if the address appears to be globally routable. /// - /// See the documentation for [`Ipv4Addr::is_global`] and - /// [`Ipv6Addr::is_global`] for more details. + /// See the documentation for [`Ipv4Addr::is_global()`] and + /// [`Ipv6Addr::is_global()`] for more details. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -203,8 +203,8 @@ impl IpAddr { /// Returns [`true`] if this is a multicast address. /// - /// See the documentation for [`Ipv4Addr::is_multicast`] and - /// [`Ipv6Addr::is_multicast`] for more details. + /// See the documentation for [`Ipv4Addr::is_multicast()`] and + /// [`Ipv6Addr::is_multicast()`] for more details. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -226,8 +226,8 @@ impl IpAddr { /// Returns [`true`] if this address is in a range designated for documentation. /// - /// See the documentation for [`Ipv4Addr::is_documentation`] and - /// [`Ipv6Addr::is_documentation`] for more details. + /// See the documentation for [`Ipv4Addr::is_documentation()`] and + /// [`Ipv6Addr::is_documentation()`] for more details. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -470,23 +470,24 @@ impl Ipv4Addr { /// Returns [`true`] if the address appears to be globally routable. /// See [iana-ipv4-special-registry][ipv4-sr]. /// - /// The following return false: + /// The following return [`false`]: /// - /// - private addresses (see [`Ipv4Addr::is_private`]) - /// - the loopback address (see [`Ipv4Addr::is_loopback`]) - /// - the link-local address (see [`Ipv4Addr::is_link_local`]) - /// - the broadcast address (see [`Ipv4Addr::is_broadcast`]) - /// - addresses used for documentation (see [`Ipv4Addr::is_documentation`]) - /// - the unspecified address (see [`Ipv4Addr::is_unspecified`]), and the whole + /// - private addresses (see [`Ipv4Addr::is_private()`]) + /// - the loopback address (see [`Ipv4Addr::is_loopback()`]) + /// - the link-local address (see [`Ipv4Addr::is_link_local()`]) + /// - the broadcast address (see [`Ipv4Addr::is_broadcast()`]) + /// - addresses used for documentation (see [`Ipv4Addr::is_documentation()`]) + /// - the unspecified address (see [`Ipv4Addr::is_unspecified()`]), and the whole /// 0.0.0.0/8 block /// - addresses reserved for future protocols (see - /// [`Ipv4Addr::is_ietf_protocol_assignment`], except + /// [`Ipv4Addr::is_ietf_protocol_assignment()`], except /// `192.0.0.9/32` and `192.0.0.10/32` which are globally routable - /// - addresses reserved for future use (see [`Ipv4Addr::is_reserved`] + /// - addresses reserved for future use (see [`Ipv4Addr::is_reserved()`] /// - addresses reserved for networking devices benchmarking (see - /// [`Ipv4Addr::is_benchmarking`]) + /// [`Ipv4Addr::is_benchmarking()`]) /// /// [`true`]: ../../std/primitive.bool.html + /// [`false`]: ../../std/primitive.bool.html /// [ipv4-sr]: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml /// /// # Examples @@ -1218,7 +1219,7 @@ impl Ipv6Addr { /// /// This method validates the format defined in the RFC and won't recognize the following /// addresses such as `fe80:0:0:1::` or `fe81::` as unicast link-local addresses for example. - /// If you need a less strict validation use [`Ipv6Addr::is_unicast_link_local`] instead. + /// If you need a less strict validation use [`Ipv6Addr::is_unicast_link_local()`] instead. /// /// [`true`]: ../../std/primitive.bool.html /// @@ -1249,7 +1250,7 @@ impl Ipv6Addr { /// - [IETF RFC 4291 section 2.5.6] /// - [RFC 4291 errata 4406] (which has been rejected but provides useful /// insight) - /// - [`Ipv6Addr::is_unicast_link_local`] + /// - [`Ipv6Addr::is_unicast_link_local()`] /// /// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 /// [IETF RFC 4291 section 2.5.6]: https://tools.ietf.org/html/rfc4291#section-2.5.6 @@ -1275,9 +1276,9 @@ impl Ipv6Addr { /// ``` /// /// As a result, this method consider addresses such as `fe80:0:0:1::` or `fe81::` to be - /// unicast link-local addresses, whereas [`Ipv6Addr::is_unicast_link_local_strict`] does not. + /// unicast link-local addresses, whereas [`Ipv6Addr::is_unicast_link_local_strict()`] does not. /// If you need a strict validation fully compliant with the RFC, use - /// [`Ipv6Addr::is_unicast_link_local_strict`] instead. + /// [`Ipv6Addr::is_unicast_link_local_strict()`] instead. /// /// [`true`]: ../../std/primitive.bool.html /// |
