File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ macro_rules! __impl {
1111
1212 impl $name {
1313 #[ inline( always) ]
14- pub fn new_unchecked( ) -> Self {
14+ pub unsafe fn new_unchecked( ) -> Self {
1515 Self { __private: ( ) }
1616 }
1717
Original file line number Diff line number Diff line change @@ -234,19 +234,19 @@ macro_rules! simd_type {
234234 /// - the required CPU features must be available.
235235 #[ inline]
236236 pub unsafe fn new_unchecked( ) -> Self {
237- Self {
237+ unsafe { Self {
238238 $( $ident: <$crate:: core_arch:: __impl_type!( $feature) >:: new_unchecked( ) , ) *
239- }
239+ } }
240240 }
241241
242242 /// Returns a SIMD token type if the required CPU features for this type are
243243 /// available, otherwise returns `None`.
244244 #[ inline]
245245 pub fn try_new( ) -> Option <Self > {
246246 if Self :: is_available( ) {
247- Some ( Self {
247+ Some ( unsafe { Self {
248248 $( $ident: <$crate:: core_arch:: __impl_type!( $feature) >:: new_unchecked( ) , ) *
249- } )
249+ } } )
250250 } else {
251251 None
252252 }
@@ -287,6 +287,7 @@ macro_rules! simd_type {
287287 pub fn vectorize<F : $crate:: NullaryFnOnce >( self , f: F ) -> F :: Output {
288288 $( #[ target_feature( enable = $feature) ] ) *
289289 #[ inline]
290+ #[ allow( clippy:: too_many_arguments) ]
290291 unsafe fn imp_fastcall<F : $crate:: NullaryFnOnce >(
291292 f0: :: core:: mem:: MaybeUninit <:: core:: primitive:: usize >,
292293 f1: :: core:: mem:: MaybeUninit <:: core:: primitive:: usize >,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ macro_rules! __impl {
55 ( $name: ident, $feature: tt) => {
66 impl $name {
77 #[ inline( always) ]
8- pub fn new_unchecked( ) -> Self {
8+ pub unsafe fn new_unchecked( ) -> Self {
99 Self { __private: ( ) }
1010 }
1111
You can’t perform that action at this time.
0 commit comments