rust/library/std/src
bors 3df25ae186 Auto merge of #75019 - nanpuyue:to_ipv4_mapped, r=LukasKalbertodt
Add Ipv6Addr::to_ipv4_mapped

* add Ipv6Addr::to_ipv4_mapped
* ~~deprecate Ipv4Addr::to_ipv6_compatible & Ipv6Addr::to_ipv4~~ reference: #75150

According to [IETF RFC 4291](https://tools.ietf.org/html/rfc4291#page-10), the "IPv4-Compatible IPv6 address" is deprecated.

> 2.5.5.1.  IPv4-Compatible IPv6 Address
>
>    The "IPv4-Compatible IPv6 address" was defined to assist in the IPv6
>    transition.  The format of the "IPv4-Compatible IPv6 address" is as
>    follows:
>
>    |                80 bits               | 16 |      32 bits        |
>    +--------------------------------------+--------------------------+
>    |0000..............................0000|0000|    IPv4 address     |
>    +--------------------------------------+----+---------------------+
>
>    Note: The IPv4 address used in the "IPv4-Compatible IPv6 address"
>    must be a globally-unique IPv4 unicast address.
>
>    The "IPv4-Compatible IPv6 address" is now deprecated because the
>    current IPv6 transition mechanisms no longer use these addresses.
>    New or updated implementations are not required to support this
>    address type.

And the current implementation of `Ipv4Addr::to_ipv6_compatible`is incorrect: it does not check whether the IPv4 address is a globally-unique IPv4 unicast address.

Please let me know if there are any issues with this pull request.
2020-08-12 16:30:46 +00:00
..
collections Update the tracking issue number of map_into_keys_values 2020-08-08 16:35:54 +02:00
ffi mv std libs to library/ 2020-07-27 19:51:13 -05:00
io mv std libs to library/ 2020-07-27 19:51:13 -05:00
net Auto merge of #75019 - nanpuyue:to_ipv4_mapped, r=LukasKalbertodt 2020-08-12 16:30:46 +00:00
os Revert #tymethods 2020-08-11 19:50:17 +05:30
prelude Move the std::vec link back to a path-based link to make it compile with --stage 0 2020-08-11 21:30:20 +02:00
sync fix typos 2020-08-02 23:20:00 +08:00
sys Rollup merge of #74842 - hermitcore:thread_local, r=Mark-Simulacrum 2020-08-09 06:41:16 +09:00
sys_common Prevent __rust_begin_short_backtrace frames from being tail-call optimised away 2020-08-07 19:31:25 +01:00
thread Disallow missing unsafe blocks in unsafe fn in panicking.rs 2020-07-29 21:58:09 +02:00
alloc.rs Replace Memoryblock with NonNull<[u8]> 2020-08-04 18:03:34 +02:00
ascii.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
backtrace.rs std: Switch from libbacktrace to gimli 2020-07-28 16:34:01 -07:00
env.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
error.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
f32.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
f64.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fs.rs Update fs::remove_file docs 2020-07-29 08:18:01 +03:00
future.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
keyword_docs.rs Add an example about the behaviour of move and Fn* traits 2020-08-08 15:57:17 +02:00
lazy.rs Fix RefUnwindSafe & UnwinsSafe impls for lazy::SyncLazy 2020-07-28 09:51:08 +02:00
lib.rs Transmute between big endian s6_addr and [u16; 8]. 2020-08-10 00:50:26 +00:00
macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
memchr.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
num.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
panic.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
panicking.rs Rollup merge of #74200 - poliorcetics:std-panicking-unsafe-block-in-unsafe-fn, r=Mark-Simulacrum 2020-08-10 09:07:46 +09:00
path.rs Rollup merge of #75286 - pickfire:patch-9, r=jyn514 2020-08-10 09:07:52 +09:00
primitive_docs.rs Improve f32 and f64 primitive documentation 2020-07-28 17:41:58 +02:00
process.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
rt.rs Prevent __rust_begin_short_backtrace frames from being tail-call optimised away 2020-08-07 19:31:25 +01:00
time.rs Remove two links by changing the doc for SystemTimeError::duration 2020-08-11 21:53:02 +02:00