@@ -17,7 +17,7 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf, ValidityRequirement};
17
17
use rustc_middle:: ty:: print:: { with_no_trimmed_paths, with_no_visible_paths} ;
18
18
use rustc_middle:: ty:: { self , Instance , Ty } ;
19
19
use rustc_session:: config:: OptLevel ;
20
- use rustc_span:: source_map:: Span ;
20
+ use rustc_span:: source_map:: { Span , Spanned } ;
21
21
use rustc_span:: { sym, Symbol } ;
22
22
use rustc_target:: abi:: call:: { ArgAbi , FnAbi , PassMode , Reg } ;
23
23
use rustc_target:: abi:: { self , HasDataLayout , WrappingRange } ;
@@ -743,7 +743,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
743
743
bx : & mut Bx ,
744
744
terminator : & mir:: Terminator < ' tcx > ,
745
745
func : & mir:: Operand < ' tcx > ,
746
- args : & [ mir:: Operand < ' tcx > ] ,
746
+ args : & [ Spanned < mir:: Operand < ' tcx > > ] ,
747
747
destination : mir:: Place < ' tcx > ,
748
748
target : Option < mir:: BasicBlock > ,
749
749
unwind : mir:: UnwindAction ,
@@ -794,7 +794,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
794
794
795
795
let extra_args = & args[ sig. inputs ( ) . skip_binder ( ) . len ( ) ..] ;
796
796
let extra_args = bx. tcx ( ) . mk_type_list_from_iter ( extra_args. iter ( ) . map ( |op_arg| {
797
- let op_ty = op_arg. ty ( self . mir , bx. tcx ( ) ) ;
797
+ let op_ty = op_arg. node . ty ( self . mir , bx. tcx ( ) ) ;
798
798
self . monomorphize ( op_ty)
799
799
} ) ) ;
800
800
@@ -864,7 +864,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
864
864
// checked by const-qualification, which also
865
865
// promotes any complex rvalues to constants.
866
866
if i == 2 && intrinsic == sym:: simd_shuffle {
867
- if let mir:: Operand :: Constant ( constant) = arg {
867
+ if let Spanned { node : mir:: Operand :: Constant ( constant) , .. } = arg {
868
868
let ( llval, ty) = self . simd_shuffle_indices ( & bx, constant) ;
869
869
return OperandRef {
870
870
val : Immediate ( llval) ,
@@ -875,7 +875,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
875
875
}
876
876
}
877
877
878
- self . codegen_operand ( bx, arg)
878
+ self . codegen_operand ( bx, & arg. node )
879
879
} )
880
880
. collect ( ) ;
881
881
@@ -911,7 +911,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
911
911
912
912
let mut copied_constant_arguments = vec ! [ ] ;
913
913
' make_args: for ( i, arg) in first_args. iter ( ) . enumerate ( ) {
914
- let mut op = self . codegen_operand ( bx, arg) ;
914
+ let mut op = self . codegen_operand ( bx, & arg. node ) ;
915
915
916
916
if let ( 0 , Some ( ty:: InstanceDef :: Virtual ( _, idx) ) ) = ( i, def) {
917
917
match op. val {
@@ -989,7 +989,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
989
989
990
990
// The callee needs to own the argument memory if we pass it
991
991
// by-ref, so make a local copy of non-immediate constants.
992
- match ( arg, op. val ) {
992
+ match ( & arg. node , op. val ) {
993
993
( & mir:: Operand :: Copy ( _) , Ref ( _, None , _) )
994
994
| ( & mir:: Operand :: Constant ( _) , Ref ( _, None , _) ) => {
995
995
let tmp = PlaceRef :: alloca ( bx, op. layout ) ;
@@ -1004,7 +1004,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
1004
1004
self . codegen_argument ( bx, op, & mut llargs, & fn_abi. args [ i] ) ;
1005
1005
}
1006
1006
let num_untupled = untuple. map ( |tup| {
1007
- self . codegen_arguments_untupled ( bx, tup, & mut llargs, & fn_abi. args [ first_args. len ( ) ..] )
1007
+ self . codegen_arguments_untupled (
1008
+ bx,
1009
+ & tup. node ,
1010
+ & mut llargs,
1011
+ & fn_abi. args [ first_args. len ( ) ..] ,
1012
+ )
1008
1013
} ) ;
1009
1014
1010
1015
let needs_location =
0 commit comments