1
Fork 0

Make all methods of std::net::Ipv6Addr const

Make the following methods of `std::net::Ipv6Addr` unstable const under the `const_ipv6` feature:
- `segments`
- `is_unspecified`
- `is_loopback`
- `is_global` (unstable)
- `is_unique_local`
- `is_unicast_link_local_strict`
- `is_documentation`
- `multicast_scope`
- `is_multicast`
- `to_ipv4_mapped`
- `to_ipv4`

Changed the implementation of `is_unspecified` and `is_loopback` to use a `match` instead of `==`.

Part of #76205
This commit is contained in:
CDirkx 2020-09-01 19:00:20 +02:00
parent e88e908e66
commit b31cc8f83e
2 changed files with 31 additions and 16 deletions

View file

@ -238,6 +238,7 @@
#![feature(concat_idents)]
#![feature(const_cstr_unchecked)]
#![feature(const_fn_transmute)]
#![feature(const_ipv6)]
#![feature(const_raw_ptr_deref)]
#![feature(container_error_extra)]
#![feature(core_intrinsics)]