Skip to content

Commit 536b0c0

Browse files
authored
Rollup merge of rust-lang#75150 - nanpuyue:deprecate_to_ipv6_compatible, 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)
2 parents 51f79b6 + 3b29913 commit 536b0c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/net/ip.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,9 @@ impl Ipv4Addr {
745745
///
746746
/// a.b.c.d becomes ::a.b.c.d
747747
///
748+
/// This isn't typically the method you want; these addresses don't typically
749+
/// function on modern systems. Use `to_ipv6_mapped` instead.
750+
///
748751
/// [`IPv6` address]: Ipv6Addr
749752
///
750753
/// # Examples

0 commit comments

Comments
 (0)