@@ -85,7 +85,7 @@ pub(crate) fn get_function_sig<'tcx>(
8585 clif_sig_from_fn_abi (
8686 tcx,
8787 default_call_conv,
88- & FullyMonomorphizedLayoutCx ( tcx) . fn_abi_of_instance ( inst, ty:: List :: empty ( ) ) ,
88+ FullyMonomorphizedLayoutCx ( tcx) . fn_abi_of_instance ( inst, ty:: List :: empty ( ) ) ,
8989 )
9090}
9191
@@ -114,7 +114,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
114114 /// Instance must be monomorphized
115115 pub ( crate ) fn get_function_ref ( & mut self , inst : Instance < ' tcx > ) -> FuncRef {
116116 let func_id = import_function ( self . tcx , self . module , inst) ;
117- let func_ref = self . module . declare_func_in_func ( func_id, & mut self . bcx . func ) ;
117+ let func_ref = self . module . declare_func_in_func ( func_id, self . bcx . func ) ;
118118
119119 if self . clif_comments . enabled ( ) {
120120 self . add_comment ( func_ref, format ! ( "{:?}" , inst) ) ;
@@ -185,7 +185,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
185185 ) -> & [ Value ] {
186186 let sig = Signature { params, returns, call_conv : self . target_config . default_call_conv } ;
187187 let func_id = self . module . declare_function ( name, Linkage :: Import , & sig) . unwrap ( ) ;
188- let func_ref = self . module . declare_func_in_func ( func_id, & mut self . bcx . func ) ;
188+ let func_ref = self . module . declare_func_in_func ( func_id, self . bcx . func ) ;
189189 let call_inst = self . bcx . ins ( ) . call ( func_ref, args) ;
190190 if self . clif_comments . enabled ( ) {
191191 self . add_comment ( func_ref, format ! ( "{:?}" , name) ) ;
@@ -419,7 +419,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
419419 if fx. tcx . symbol_name ( instance) . name . starts_with ( "llvm." ) {
420420 crate :: intrinsics:: codegen_llvm_intrinsic_call (
421421 fx,
422- & fx. tcx . symbol_name ( instance) . name ,
422+ fx. tcx . symbol_name ( instance) . name ,
423423 args,
424424 ret_place,
425425 target,
@@ -534,7 +534,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
534534 }
535535
536536 let ( ptr, method) = crate :: vtable:: get_ptr_and_method_ref ( fx, args[ 0 ] . value , idx) ;
537- let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , & fn_abi) ;
537+ let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , fn_abi) ;
538538 let sig = fx. bcx . import_signature ( sig) ;
539539
540540 ( CallTarget :: Indirect ( sig, method) , Some ( ptr. get_addr ( fx) ) )
@@ -554,7 +554,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
554554 }
555555
556556 let func = func. load_scalar ( fx) ;
557- let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , & fn_abi) ;
557+ let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , fn_abi) ;
558558 let sig = fx. bcx . import_signature ( sig) ;
559559
560560 ( CallTarget :: Indirect ( sig, func) , None )
@@ -564,7 +564,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
564564 self :: returning:: codegen_with_call_return_arg ( fx, & fn_abi. ret , ret_place, |fx, return_ptr| {
565565 let mut call_args = return_ptr
566566 . into_iter ( )
567- . chain ( first_arg_override. into_iter ( ) )
567+ . chain ( first_arg_override)
568568 . chain (
569569 args. into_iter ( )
570570 . enumerate ( )
@@ -577,7 +577,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
577577
578578 // FIXME: Find a cleaner way to support varargs.
579579 if fn_abi. c_variadic {
580- adjust_call_for_c_variadic ( fx, & fn_abi, source_info, func_ref, & mut call_args) ;
580+ adjust_call_for_c_variadic ( fx, fn_abi, source_info, func_ref, & mut call_args) ;
581581 }
582582
583583 if fx. clif_comments . enabled ( ) {
@@ -739,7 +739,7 @@ pub(crate) fn codegen_drop<'tcx>(
739739 let fn_abi = FullyMonomorphizedLayoutCx ( fx. tcx )
740740 . fn_abi_of_instance ( virtual_drop, ty:: List :: empty ( ) ) ;
741741
742- let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , & fn_abi) ;
742+ let sig = clif_sig_from_fn_abi ( fx. tcx , fx. target_config . default_call_conv , fn_abi) ;
743743 let sig = fx. bcx . import_signature ( sig) ;
744744 codegen_call_with_unwind_action (
745745 fx,
@@ -767,9 +767,12 @@ pub(crate) fn codegen_drop<'tcx>(
767767 if drop_instance. def . requires_caller_location ( fx. tcx ) {
768768 // Pass the caller location for `#[track_caller]`.
769769 let caller_location = fx. get_caller_location ( source_info) ;
770- call_args. extend (
771- adjust_arg_for_abi ( fx, caller_location, & fn_abi. args [ 1 ] , false ) . into_iter ( ) ,
772- ) ;
770+ call_args. extend ( adjust_arg_for_abi (
771+ fx,
772+ caller_location,
773+ & fn_abi. args [ 1 ] ,
774+ false ,
775+ ) ) ;
773776 }
774777
775778 let func_ref = fx. get_function_ref ( drop_instance) ;
@@ -816,9 +819,9 @@ pub(crate) fn codegen_call_with_unwind_action(
816819 match unwind {
817820 UnwindAction :: Continue | UnwindAction :: Unreachable => {
818821 let call_inst = match func_ref {
819- CallTarget :: Direct ( func_ref) => fx. bcx . ins ( ) . call ( func_ref, & call_args) ,
822+ CallTarget :: Direct ( func_ref) => fx. bcx . ins ( ) . call ( func_ref, call_args) ,
820823 CallTarget :: Indirect ( sig, func_ptr) => {
821- fx. bcx . ins ( ) . call_indirect ( sig, func_ptr, & call_args)
824+ fx. bcx . ins ( ) . call_indirect ( sig, func_ptr, call_args)
822825 }
823826 } ;
824827
@@ -866,10 +869,10 @@ pub(crate) fn codegen_call_with_unwind_action(
866869
867870 match func_ref {
868871 CallTarget :: Direct ( func_ref) => {
869- fx. bcx . ins ( ) . try_call ( func_ref, & call_args, exception_table) ;
872+ fx. bcx . ins ( ) . try_call ( func_ref, call_args, exception_table) ;
870873 }
871874 CallTarget :: Indirect ( _sig, func_ptr) => {
872- fx. bcx . ins ( ) . try_call_indirect ( func_ptr, & call_args, exception_table) ;
875+ fx. bcx . ins ( ) . try_call_indirect ( func_ptr, call_args, exception_table) ;
873876 }
874877 }
875878
0 commit comments