about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-01-29 19:40:51 +0000
committerbors <bors@rust-lang.org>2019-01-29 19:40:51 +0000
commitc1c3c4e95b69dfeaca5c5db6c622d7f90ad30a54 (patch)
treed2a40a3d863cfc4c25c0860eb9e0f7053ab012ba /src/libstd/lib.rs
parent74256630117fedf479edbd1145cac47c88036aec (diff)
parent938a814e87878e2ff718935f5c7a12f120758c05 (diff)
downloadrust-c1c3c4e95b69dfeaca5c5db6c622d7f90ad30a54.tar.gz
rust-c1c3c4e95b69dfeaca5c5db6c622d7f90ad30a54.zip
Auto merge of #57808 - gnzlbg:ustdsimd, r=gnzlbg
Update stdsimd

This is the companion PR to https://github.com/rust-lang-nursery/stdsimd/pull/640

r? @alexcrichton
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index c94a33da037..244caf28ec7 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -358,6 +358,9 @@ pub mod prelude;
 // Public module declarations and re-exports
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::any;
+#[stable(feature = "simd_arch", since = "1.27.0")]
+#[doc(no_inline)]
+pub use core::arch;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use core::cell;
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -489,29 +492,22 @@ mod memchr;
 // compiler
 pub mod rt;
 
-// Pull in 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.
+// Pull in the `std_detect` crate directly into libstd. The contents of
+// `std_detect` are in a different repository: rust-lang-nursery/stdsimd.
 //
-// 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"]
+// `std_detect` depends on libstd, but the contents of this module are
+// set up in such a way that directly pulling it here works such that the
+// crate uses the this crate as its libstd.
+#[path = "../stdsimd/crates/std_detect/src/mod.rs"]
 #[allow(missing_debug_implementations, missing_docs, dead_code)]
 #[unstable(feature = "stdsimd", issue = "48556")]
 #[cfg(not(test))]
-mod stdsimd;
-
-// A "fake" module needed by the `stdsimd` module to compile, not actually
-// exported though.
-mod coresimd {
-    pub use core::arch;
-}
+mod std_detect;
 
-#[stable(feature = "simd_arch", since = "1.27.0")]
+#[doc(hidden)]
+#[unstable(feature = "stdsimd", issue = "48556")]
 #[cfg(not(test))]
-pub use stdsimd::arch;
+pub use std_detect::detect;
 
 // Include a number of private modules that exist solely to provide
 // the rustdoc documentation for primitive types. Using `include!`