Skip to content

Commit

Permalink
Rollup merge of rust-lang#75150 - nanpuyue:deprecate_to_ipv6_compatib…
Browse files Browse the repository at this point in the history
…le, r=LukasKalbertodt

Add a note for Ipv4Addr::to_ipv6_compatible

Previous discussion: rust-lang#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 rust-lang#75150 (comment)
  • Loading branch information
Dylan-DPC authored Sep 3, 2020
2 parents 51f79b6 + 3b29913 commit 536b0c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 536b0c0

Please sign in to comment.