rust/library/std/src
Tyler Mandry 11ff32f9ec
Rollup merge of #76206 - CDirkx:const-ipv6, r=ecstatic-morse
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`

This would make all methods of `Ipv6Addr` const.

Changed the implementation of `is_unspecified` and `is_loopback` to use a `match` instead of `==`, all other methods did not require a change.

All these methods are dependent on `segments`, the current implementation of which requires unstable `const_fn_transmute` ([PR#75085](https://github.com/rust-lang/rust/pull/75085)).

Part of #76205
2020-09-01 18:24:41 -07:00
..
backtrace std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
collections std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
ffi std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
fs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
io Auto merge of #76047 - Dylan-DPC:rename/maybe, r=RalfJung 2020-09-01 05:41:22 +00:00
lazy std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
memchr std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
net Change implementation of Ipv6Addr::is_unspecified and is_loopback from matches! to u128 comparison 2020-09-01 21:05:26 +02:00
num std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
os std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
path std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
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
process std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sync std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sys std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sys_common std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
thread std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
time std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
alloc.rs Allow reallocation to different alignment 2020-08-19 06:46:47 +02:00
ascii.rs Move to intra doc links for ascii.rs and panic.rs, updating the docs a little 2020-08-12 22:58:18 +02:00
backtrace.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
env.rs Rollup merge of #75945 - pickfire:patch-7, r=jyn514 2020-08-31 19:18:13 -07:00
error.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
fs.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
future.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
keyword_docs.rs Move to intra doc links for keyword documentation 2020-08-17 22:17:14 +02:00
lazy.rs Auto merge of #76047 - Dylan-DPC:rename/maybe, r=RalfJung 2020-09-01 05:41:22 +00:00
lib.rs Make all methods of std::net::Ipv6Addr const 2020-09-01 19:00:20 +02:00
macros.rs Add missing links 2020-08-22 20:23:50 -07:00
memchr.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
num.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
panic.rs Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
panicking.rs Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
path.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
primitive_docs.rs Break line at 100 characters 2020-08-31 19:44:21 -07:00
process.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00: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 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00