@@ -103,7 +103,7 @@ pub fn get_available_encodings() -> &'static Encodings {
103103 let mut status = icu_ffi:: U_ZERO_ERROR ;
104104 let mime = ( f. ucnv_getStandardName ) (
105105 name. as_ptr ( ) ,
106- c"MIME" . as_ptr ( ) as * const _ ,
106+ c"MIME" . as_ptr ( ) . cast ( ) ,
107107 & mut status,
108108 ) ;
109109 if !mime. is_null ( ) && status. is_success ( ) {
@@ -182,7 +182,7 @@ impl<'pivot> Converter<'pivot> {
182182 return Err ( status. as_error ( ) ) ;
183183 }
184184
185- let pivot_source = pivot_buffer. as_mut_ptr ( ) as * mut u16 ;
185+ let pivot_source = pivot_buffer. as_mut_ptr ( ) . cast :: < u16 > ( ) ;
186186 let pivot_target = unsafe { pivot_source. add ( pivot_buffer. len ( ) ) } ;
187187
188188 Ok ( Self { source, target, pivot_buffer, pivot_source, pivot_target, reset : true } )
@@ -217,11 +217,11 @@ impl<'pivot> Converter<'pivot> {
217217 let input_end = unsafe { input_beg. add ( input. len ( ) ) } ;
218218 let mut input_ptr = input_beg;
219219
220- let output_beg = output. as_mut_ptr ( ) as * mut u8 ;
220+ let output_beg = output. as_mut_ptr ( ) . cast :: < u8 > ( ) ;
221221 let output_end = unsafe { output_beg. add ( output. len ( ) ) } ;
222222 let mut output_ptr = output_beg;
223223
224- let pivot_beg = self . pivot_buffer . as_mut_ptr ( ) as * mut u16 ;
224+ let pivot_beg = self . pivot_buffer . as_mut_ptr ( ) . cast :: < u16 > ( ) ;
225225 let pivot_end = unsafe { pivot_beg. add ( self . pivot_buffer . len ( ) ) } ;
226226
227227 let flush = input. is_empty ( ) ;
@@ -359,7 +359,7 @@ fn text_buffer_from_utext<'a>(ut: &icu_ffi::UText) -> &'a TextBuffer {
359359}
360360
361361fn double_cache_from_utext < ' a > ( ut : & icu_ffi:: UText ) -> & ' a mut DoubleCache {
362- unsafe { & mut * ( ut. p_extra as * mut DoubleCache ) }
362+ unsafe { & mut * ut. p_extra . cast ( ) }
363363}
364364
365365extern "C" fn utext_clone (
@@ -874,9 +874,9 @@ pub fn fold_case<'a>(arena: &'a Arena, input: &str) -> BString<'a> {
874874 output_len = unsafe {
875875 ( f. ucasemap_utf8FoldCase ) (
876876 casemap,
877- output. as_mut_ptr ( ) as * mut _ ,
877+ output. as_mut_ptr ( ) . cast ( ) ,
878878 output. len ( ) as i32 ,
879- input. as_ptr ( ) as * const _ ,
879+ input. as_ptr ( ) . cast ( ) ,
880880 input. len ( ) as i32 ,
881881 & mut status,
882882 )
@@ -890,9 +890,9 @@ pub fn fold_case<'a>(arena: &'a Arena, input: &str) -> BString<'a> {
890890 output_len = unsafe {
891891 ( f. ucasemap_utf8FoldCase ) (
892892 casemap,
893- output. as_mut_ptr ( ) as * mut _ ,
893+ output. as_mut_ptr ( ) . cast ( ) ,
894894 output. len ( ) as i32 ,
895- input. as_ptr ( ) as * const _ ,
895+ input. as_ptr ( ) . cast ( ) ,
896896 input. len ( ) as i32 ,
897897 & mut status,
898898 )
@@ -958,7 +958,8 @@ struct LibraryFunctions {
958958macro_rules! proc_name {
959959 ( $s: literal) => {
960960 concat!( env!( "EDIT_CFG_ICU_EXPORT_PREFIX" ) , $s, env!( "EDIT_CFG_ICU_EXPORT_SUFFIX" ) , "\0 " )
961- . as_ptr( ) as * const c_char
961+ . as_ptr( )
962+ . cast( )
962963 } ;
963964}
964965
@@ -1034,7 +1035,7 @@ fn init_if_needed() -> Result<&'static LibraryFunctions> {
10341035 ) ;
10351036
10361037 let mut funcs = MaybeUninit :: < LibraryFunctions > :: uninit ( ) ;
1037- let mut ptr = funcs. as_mut_ptr ( ) as * mut TransparentFunction ;
1038+ let mut ptr = funcs. as_mut_ptr ( ) . cast :: < TransparentFunction > ( ) ;
10381039
10391040 #[ cfg( edit_icu_renaming_auto_detect) ]
10401041 let scratch_outer = scratch_arena ( None ) ;
0 commit comments