about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-03 19:40:21 +0000
committerbors <bors@rust-lang.org>2018-03-03 19:40:21 +0000
commite026b59cf4f4cb9dd86510438085efafbc630e5a (patch)
tree43a39e9b97bf2cb152a365fbe4892c73794d2935 /src/libstd
parent3b8bd530b0ec0dc7538c12799468867662f818cc (diff)
parentea354b6a0141c40eef98a2281ddfe7aed59510fb (diff)
downloadrust-e026b59cf4f4cb9dd86510438085efafbc630e5a.tar.gz
rust-e026b59cf4f4cb9dd86510438085efafbc630e5a.zip
Auto merge of #48694 - kennytm:rollup, r=kennytm
Rollup of 8 pull requests

- Successful merges: #48283, #48466, #48569, #48629, #48637, #48680, #48513, #48664
- Failed merges:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/lib.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index d7d856fe3ad..a7e1c0ce732 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -299,6 +299,7 @@
 #![feature(rand)]
 #![feature(raw)]
 #![feature(rustc_attrs)]
+#![feature(stdsimd)]
 #![feature(sip_hash_13)]
 #![feature(slice_bytes)]
 #![feature(slice_concat_ext)]
@@ -501,6 +502,35 @@ mod memchr;
 // compiler
 pub mod rt;
 
+// Pull in the the `stdsimd` crate directly into libstd. This is the same as
+// libcore's arch/simd modules where the source of truth here is in a different
+// repository, but we pull things in here manually to get it into libstd.
+//
+// Note that the #[cfg] here is intended to do two things. First it allows us to
+// change the rustc implementation of intrinsics in stage0 by not compiling simd
+// intrinsics in stage0. Next it doesn't compile anything in test mode as
+// stdsimd has tons of its own tests which we don't want to run.
+#[path = "../stdsimd/stdsimd/mod.rs"]
+#[allow(missing_debug_implementations, missing_docs, dead_code)]
+#[unstable(feature = "stdsimd", issue = "48556")]
+#[cfg(all(not(stage0), not(test)))]
+mod stdsimd;
+
+// A "fake" module needed by the `stdsimd` module to compile, not actually
+// exported though.
+#[cfg(not(stage0))]
+mod coresimd {
+    pub use core::arch;
+    pub use core::simd;
+}
+
+#[unstable(feature = "stdsimd", issue = "48556")]
+#[cfg(all(not(stage0), not(test)))]
+pub use stdsimd::simd;
+#[unstable(feature = "stdsimd", issue = "48556")]
+#[cfg(all(not(stage0), not(test)))]
+pub use stdsimd::arch;
+
 // Include a number of private modules that exist solely to provide
 // the rustdoc documentation for primitive types. Using `include!`
 // because rustdoc only looks for these modules at the crate level.