diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-09-03 02:21:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-03 02:21:58 +0200 |
| commit | 536b0c0c9051f879e473f1040f94773ed070ebe9 (patch) | |
| tree | 99798a4550b30f18407df030b100b37e8b2ba451 | |
| parent | 51f79b618d41b8319134827d92ccc674dab4aa32 (diff) | |
| parent | 3b29913295010e538df9a692f4e59ece9ed362d8 (diff) | |
| download | rust-536b0c0c9051f879e473f1040f94773ed070ebe9.tar.gz rust-536b0c0c9051f879e473f1040f94773ed070ebe9.zip | |
Rollup merge of #75150 - nanpuyue:deprecate_to_ipv6_compatible, r=LukasKalbertodt
Add a note for Ipv4Addr::to_ipv6_compatible Previous discussion: #75019 > I think adding a comment saying "This isn't typically the method you want; these addresses don't typically function on modern systems. Use `to_ipv6_mapped` instead." would be a good first step, whether this method gets marked as deprecated or not. _Originally posted by @joshtriplett in https://github.com/rust-lang/rust/pull/75150#issuecomment-680267745_
| -rw-r--r-- | library/std/src/net/ip.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index 341a112df71..5aff2b5bb78 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -745,6 +745,9 @@ impl Ipv4Addr { /// /// a.b.c.d becomes ::a.b.c.d /// + /// This isn't typically the method you want; these addresses don't typically + /// function on modern systems. Use `to_ipv6_mapped` instead. + /// /// [`IPv6` address]: Ipv6Addr /// /// # Examples |
