about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-08 10:42:04 +0000
committerbors <bors@rust-lang.org>2018-08-08 10:42:04 +0000
commitebe8df41d70d8763e0a15aefe078b035d3519214 (patch)
treed5bd5bac86ca88d7299ec6c6bfb125a10828d43f /src/libstd/lib.rs
parentffb09dfb3a9b252e26cd4f6570e9ff1b8a742edc (diff)
parentc0041f4a17b587cf47f0ecc481afb29a4ae28716 (diff)
Auto merge of #52872 - faern:use-modern-alignment-libc, r=TimNN
Make IpvXAddr::new const fns and the well known addresses associated constants

Implements/fixes https://github.com/rust-lang/rust/issues/44582

I just got a PR towards libc (https://github.com/rust-lang/libc/pull/1044) merged. With the new feature added in that PR it is now possible to create `in6_addr` instances as consts. This enables us to finally make the constructors of the IP structs const fns and to make the localhost/unspecified addresses associated constants, as agreed in the above mentioned tracking issue.

I also added a BROADCAST constant. Personally this is the well known address I tend to need the most often.
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 2f18719b9eb..0bc968b6c5c 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -252,6 +252,8 @@
 #![feature(char_error_internals)]
 #![feature(compiler_builtins_lib)]
 #![feature(const_fn)]
+#![feature(const_int_ops)]
+#![feature(const_ip)]
 #![feature(core_intrinsics)]
 #![feature(dropck_eyepatch)]
 #![feature(exact_size_is_empty)]
@@ -281,6 +283,7 @@
 #![feature(ptr_internals)]
 #![feature(raw)]
 #![feature(rustc_attrs)]
+#![feature(rustc_const_unstable)]
 #![feature(std_internals)]
 #![feature(stdsimd)]
 #![feature(shrink_to)]