diff options
| author | Corentin Henry <corentinhenry@gmail.com> | 2019-04-23 10:40:15 +0200 |
|---|---|---|
| committer | Corentin Henry <corentinhenry@gmail.com> | 2019-04-23 10:41:25 +0200 |
| commit | fe718ef07f56457740b59b196eed0f1226137895 (patch) | |
| tree | 260ea709979d6d8ee40b8069df0329544c574c5a /src/libstd/net | |
| parent | 634dcd00b4f4a57cea0baae85d364d433897bf59 (diff) | |
| download | rust-fe718ef07f56457740b59b196eed0f1226137895.tar.gz rust-fe718ef07f56457740b59b196eed0f1226137895.zip | |
std::net: add warning in Ipv4addr::is_reserved() documentation
See @the8472 comment's on Github: https://github.com/rust-lang/rust/pull/60145#issuecomment-485424229 > I don't think is_reserved including ranges marked for future use is > a good idea since those future uses may be realized at at some point > and then old software with is_reserved filters may have false > positives. This is not a hypothetical concern, such issues have been > encountered before when IANA assigned previously reserved /8 address > blocks.
Diffstat (limited to 'src/libstd/net')
| -rw-r--r-- | src/libstd/net/ip.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index e3e257f5ac1..6ea49de49af 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -677,6 +677,13 @@ impl Ipv4Addr { /// [IETF RFC 1112]: https://tools.ietf.org/html/rfc1112 /// [`true`]: ../../std/primitive.bool.html /// + /// # Warning + /// + /// As IANA assigns new addresses, this method will be + /// updated. This may result in non-reserved addresses being + /// treated as reserved in code that relies on an outdated version + /// of this method. + /// /// # Examples /// /// ``` |
