@@ -130,7 +130,9 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
130130 let llval = match name {
131131 _ if simple. is_some ( ) => {
132132 // FIXME(antoyo): remove this cast when the API supports function.
133- let func = unsafe { std:: mem:: transmute ( simple. expect ( "simple" ) ) } ;
133+ let func = unsafe {
134+ std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( simple. expect ( "simple" ) )
135+ } ;
134136 self . call (
135137 self . type_void ( ) ,
136138 None ,
@@ -675,7 +677,11 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
675677 let step3 = self . or ( left, right) ;
676678
677679 // Fourth step.
678- if width == 8 { step3 } else { self . gcc_bswap ( step3, width) }
680+ if width == 8 {
681+ step3
682+ } else {
683+ self . gcc_bswap ( step3, width)
684+ }
679685 }
680686 128 => {
681687 // TODO(antoyo): find a more efficient implementation?
@@ -1194,7 +1200,7 @@ fn codegen_gnu_try<'gcc>(
11941200 bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None , None ) ;
11951201 } ) ;
11961202
1197- let func = unsafe { std:: mem:: transmute ( func) } ;
1203+ let func = unsafe { std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( func) } ;
11981204
11991205 // Note that no invoke is used here because by definition this function
12001206 // can't panic (that's what it's catching).
@@ -1268,7 +1274,7 @@ fn gen_fn<'a, 'gcc, 'tcx>(
12681274 // FIXME(eddyb) find a nicer way to do this.
12691275 cx. linkage . set ( FunctionType :: Internal ) ;
12701276 let func = cx. declare_fn ( name, fn_abi) ;
1271- let func_val = unsafe { std:: mem:: transmute ( func) } ;
1277+ let func_val = unsafe { std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( func) } ;
12721278 cx. set_frame_pointer_type ( func_val) ;
12731279 cx. apply_target_cpu_attr ( func_val) ;
12741280 let block = Builder :: append_block ( cx, func_val, "entry-block" ) ;
0 commit comments