File tree Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Expand file tree Collapse file tree 7 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ pub fn assert_instr(
8989 syn:: Pat :: Ident ( ref i) => & i. ident ,
9090 _ => panic ! ( "must have bare arguments" ) ,
9191 } ;
92- if let Some ( & ( _, ref tokens) ) = invoc. args . iter ( ) . find ( |a| * ident == a. 0 ) {
92+ if let Some ( ( _, tokens) ) = invoc. args . iter ( ) . find ( |a| * ident == a. 0 ) {
9393 input_vals. push ( quote ! { #tokens } ) ;
9494 } else {
9595 inputs. push ( capture) ;
@@ -104,7 +104,7 @@ pub fn assert_instr(
104104 v. clone( ) . into_token_stream( )
105105 ) ,
106106 } ;
107- if let Some ( & ( _, ref tokens) ) = invoc. args . iter ( ) . find ( |a| c. ident == a. 0 ) {
107+ if let Some ( ( _, tokens) ) = invoc. args . iter ( ) . find ( |a| c. ident == a. 0 ) {
108108 const_vals. push ( quote ! { #tokens } ) ;
109109 } else {
110110 panic ! ( "const generics must have a value for tests" ) ;
Original file line number Diff line number Diff line change @@ -18376,15 +18376,15 @@ mod tests {
1837618376 let a: __mmask64 =
1837718377 0b11111111_00000000_11111111_00000000_11111111_00000000_11111111_00000000;
1837818378 let mut r = 0;
18379- _store_mask64(&mut r as *mut _ as *mut u64 , a);
18379+ _store_mask64(&mut r, a);
1838018380 assert_eq!(r, a);
1838118381 }
1838218382
1838318383 #[simd_test(enable = "avx512bw")]
1838418384 unsafe fn test_store_mask32() {
1838518385 let a: __mmask32 = 0b11111111_00000000_11111111_00000000;
1838618386 let mut r = 0;
18387- _store_mask32(&mut r as *mut _ as *mut u32 , a);
18387+ _store_mask32(&mut r, a);
1838818388 assert_eq!(r, a);
1838918389 }
1839018390
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ mod tests {
7171 FxsaveArea { data : [ 0 ; 512 ] }
7272 }
7373 fn ptr ( & mut self ) -> * mut u8 {
74- & mut self . data [ 0 ] as * mut _ as * mut u8
74+ self . data . as_mut_ptr ( )
7575 }
7676 }
7777
Original file line number Diff line number Diff line change @@ -3881,23 +3881,23 @@ mod tests {
38813881 unsafe fn test_mm_store_si128 ( ) {
38823882 let a = _mm_set1_epi8 ( 9 ) ;
38833883 let mut r = _mm_set1_epi8 ( 0 ) ;
3884- _mm_store_si128 ( & mut r as * mut _ as * mut __m128i , a) ;
3884+ _mm_store_si128 ( & mut r, a) ;
38853885 assert_eq_m128i ( r, a) ;
38863886 }
38873887
38883888 #[ simd_test( enable = "sse2" ) ]
38893889 unsafe fn test_mm_storeu_si128 ( ) {
38903890 let a = _mm_set1_epi8 ( 9 ) ;
38913891 let mut r = _mm_set1_epi8 ( 0 ) ;
3892- _mm_storeu_si128 ( & mut r as * mut _ as * mut __m128i , a) ;
3892+ _mm_storeu_si128 ( & mut r, a) ;
38933893 assert_eq_m128i ( r, a) ;
38943894 }
38953895
38963896 #[ simd_test( enable = "sse2" ) ]
38973897 unsafe fn test_mm_storel_epi64 ( ) {
38983898 let a = _mm_setr_epi64x ( 2 , 9 ) ;
38993899 let mut r = _mm_set1_epi8 ( 0 ) ;
3900- _mm_storel_epi64 ( & mut r as * mut _ as * mut __m128i , a) ;
3900+ _mm_storel_epi64 ( & mut r, a) ;
39013901 assert_eq_m128i ( r, _mm_setr_epi64x ( 2 , 0 ) ) ;
39023902 }
39033903
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ mod tests {
180180 XsaveArea { data : [ 0 ; 2560 ] }
181181 }
182182 fn ptr ( & mut self ) -> * mut u8 {
183- & mut self . data [ 0 ] as * mut _ as * mut u8
183+ self . data . as_mut_ptr ( )
184184 }
185185 }
186186
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ mod tests {
7171 FxsaveArea { data : [ 0 ; 512 ] }
7272 }
7373 fn ptr ( & mut self ) -> * mut u8 {
74- & mut self . data [ 0 ] as * mut _ as * mut u8
74+ self . data . as_mut_ptr ( )
7575 }
7676 }
7777
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ fn normalize(mut symbol: &str) -> String {
2424
2525 // Remove Rust paths
2626 if let Some ( last_colon) = symbol. rfind ( ':' ) {
27- symbol = ( & symbol[ last_colon + 1 ..] ) . to_string ( ) ;
27+ symbol = symbol[ last_colon + 1 ..] . to_string ( ) ;
2828 }
2929
3030 // Normalize to no leading underscore to handle platforms that may
@@ -34,7 +34,7 @@ fn normalize(mut symbol: &str) -> String {
3434 }
3535 // Windows/x86 has a suffix such as @@4.
3636 if let Some ( idx) = symbol. find ( "@@" ) {
37- symbol = ( & symbol[ ..idx] ) . to_string ( ) ;
37+ symbol = symbol[ ..idx] . to_string ( ) ;
3838 }
3939 symbol
4040}
You can’t perform that action at this time.
0 commit comments