diff options
| author | 1011X <1011XXXXX@gmail.com> | 2018-03-04 13:35:21 -0500 |
|---|---|---|
| committer | 1011X <1011XXXXX@gmail.com> | 2018-03-04 13:35:21 -0500 |
| commit | df283db4c175d32d7859f981ac67c17669bb1fa8 (patch) | |
| tree | f199018ad7b4a6d71a5d14e02a6e9d19119ca396 /src/libstd | |
| parent | 4e4c1b5b325c4c474426a7e3c346c316fbc644f1 (diff) | |
| parent | 1e1bfc715f8dfe36a38d8fae36fcbe92e7463a3f (diff) | |
| download | rust-df283db4c175d32d7859f981ac67c17669bb1fa8.tar.gz rust-df283db4c175d32d7859f981ac67c17669bb1fa8.zip | |
Merge branch 'master' of github.com:1011X/rust
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 30 |
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. |
