@@ -125,7 +125,9 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
125125 let llval = match name {
126126 _ if simple. is_some ( ) => {
127127 // FIXME(antoyo): remove this cast when the API supports function.
128- let func = unsafe { std:: mem:: transmute ( simple. expect ( "simple" ) ) } ;
128+ let func = unsafe {
129+ std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( simple. expect ( "simple" ) )
130+ } ;
129131 self . call (
130132 self . type_void ( ) ,
131133 None ,
@@ -670,7 +672,11 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
670672 let step3 = self . or ( left, right) ;
671673
672674 // Fourth step.
673- if width == 8 { step3 } else { self . gcc_bswap ( step3, width) }
675+ if width == 8 {
676+ step3
677+ } else {
678+ self . gcc_bswap ( step3, width)
679+ }
674680 }
675681 128 => {
676682 // TODO(antoyo): find a more efficient implementation?
@@ -1189,7 +1195,7 @@ fn codegen_gnu_try<'gcc>(
11891195 bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None , None ) ;
11901196 } ) ;
11911197
1192- let func = unsafe { std:: mem:: transmute ( func) } ;
1198+ let func = unsafe { std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( func) } ;
11931199
11941200 // Note that no invoke is used here because by definition this function
11951201 // can't panic (that's what it's catching).
@@ -1263,7 +1269,7 @@ fn gen_fn<'a, 'gcc, 'tcx>(
12631269 // FIXME(eddyb) find a nicer way to do this.
12641270 cx. linkage . set ( FunctionType :: Internal ) ;
12651271 let func = cx. declare_fn ( name, fn_abi) ;
1266- let func_val = unsafe { std:: mem:: transmute ( func) } ;
1272+ let func_val = unsafe { std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( func) } ;
12671273 cx. set_frame_pointer_type ( func_val) ;
12681274 cx. apply_target_cpu_attr ( func_val) ;
12691275 let block = Builder :: append_block ( cx, func_val, "entry-block" ) ;
0 commit comments