@@ -130,7 +130,9 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
130
130
let llval = match name {
131
131
_ if simple. is_some ( ) => {
132
132
// 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
+ } ;
134
136
self . call (
135
137
self . type_void ( ) ,
136
138
None ,
@@ -675,7 +677,11 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
675
677
let step3 = self . or ( left, right) ;
676
678
677
679
// 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
+ }
679
685
}
680
686
128 => {
681
687
// TODO(antoyo): find a more efficient implementation?
@@ -1194,7 +1200,7 @@ fn codegen_gnu_try<'gcc>(
1194
1200
bx. invoke ( try_func_ty, None , None , try_func, & [ data] , then, catch, None , None ) ;
1195
1201
} ) ;
1196
1202
1197
- let func = unsafe { std:: mem:: transmute ( func) } ;
1203
+ let func = unsafe { std:: mem:: transmute :: < Function < ' gcc > , RValue < ' gcc > > ( func) } ;
1198
1204
1199
1205
// Note that no invoke is used here because by definition this function
1200
1206
// can't panic (that's what it's catching).
@@ -1268,7 +1274,7 @@ fn gen_fn<'a, 'gcc, 'tcx>(
1268
1274
// FIXME(eddyb) find a nicer way to do this.
1269
1275
cx. linkage . set ( FunctionType :: Internal ) ;
1270
1276
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) } ;
1272
1278
cx. set_frame_pointer_type ( func_val) ;
1273
1279
cx. apply_target_cpu_attr ( func_val) ;
1274
1280
let block = Builder :: append_block ( cx, func_val, "entry-block" ) ;
0 commit comments