File tree 2 files changed +1
-12
lines changed
2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,7 @@ macro_rules! types {
108
108
// SAFETY: this type is just an overaligned `[T; N]` with
109
109
// potential padding at the end, so pointer casting to a
110
110
// `&[T; N]` is safe.
111
- //
112
- // NOTE: This deliberately doesn't just use `&self.0` because it may soon be banned
113
- // see https://github.com/rust-lang/compiler-team/issues/838
114
111
unsafe { & * ( self as * const Self as * const [ $elem_type; $len] ) }
115
-
116
112
}
117
113
118
114
/// Returns a mutable array reference containing the entire SIMD vector.
@@ -121,9 +117,6 @@ macro_rules! types {
121
117
// SAFETY: this type is just an overaligned `[T; N]` with
122
118
// potential padding at the end, so pointer casting to a
123
119
// `&mut [T; N]` is safe.
124
- //
125
- // NOTE: This deliberately doesn't just use `&mut self.0` because it may soon be banned
126
- // see https://github.com/rust-lang/compiler-team/issues/838
127
120
unsafe { & mut * ( self as * mut Self as * mut [ $elem_type; $len] ) }
128
121
}
129
122
}
Original file line number Diff line number Diff line change @@ -33,13 +33,9 @@ macro_rules! simd_ty {
33
33
unsafe { simd_shuffle!( one, one, [ 0 ; $len] ) }
34
34
}
35
35
36
- /// Extract the element at position `index`.
37
- /// `index` is not a constant so this is not efficient!
38
- /// Use for testing only.
39
- // FIXME: Workaround rust@60637
40
36
#[ inline( always) ]
41
37
pub ( crate ) fn extract( & self , index: usize ) -> $elem_type {
42
- self . as_array ( ) [ index]
38
+ unsafe { $crate :: intrinsics :: simd :: simd_extract_dyn ( self , index as u32 ) }
43
39
}
44
40
45
41
#[ inline]
You can’t perform that action at this time.
0 commit comments