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_
This commit is contained in:
Dylan DPC 2020-09-03 02:21:58 +02:00 committed by GitHub
commit 536b0c0c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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