@@ -23,7 +23,6 @@ use core::num::{
23
23
NonZeroI16 , NonZeroI32 , NonZeroI64 , NonZeroI8 , NonZeroIsize , NonZeroI128
24
24
} ;
25
25
#[ cfg( feature = "simd_support" ) ] use core:: simd:: * ;
26
- use core:: mem;
27
26
28
27
impl Distribution < u8 > for Standard {
29
28
#[ inline]
@@ -123,6 +122,7 @@ impl_nzint!(NonZeroI64, NonZeroI64::new);
123
122
impl_nzint ! ( NonZeroI128 , NonZeroI128 :: new) ;
124
123
impl_nzint ! ( NonZeroIsize , NonZeroIsize :: new) ;
125
124
125
+ #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
126
126
macro_rules! x86_intrinsic_impl {
127
127
( $meta: meta, $( $intrinsic: ident) ,+) => { $(
128
128
#[ cfg( $meta) ]
@@ -132,7 +132,7 @@ macro_rules! x86_intrinsic_impl {
132
132
fn sample<R : Rng + ?Sized >( & self , rng: & mut R ) -> $intrinsic {
133
133
// On proper hardware, this should compile to SIMD instructions
134
134
// Verified on x86 Haswell with __m128i, __m256i
135
- let mut buf = [ 0_u8 ; mem:: size_of:: <$intrinsic>( ) ] ;
135
+ let mut buf = [ 0_u8 ; core :: mem:: size_of:: <$intrinsic>( ) ] ;
136
136
rng. fill_bytes( & mut buf) ;
137
137
// x86 is little endian so no need for conversion
138
138
zerocopy:: transmute!( buf)
0 commit comments