@@ -4,7 +4,6 @@ use std::convert::TryFrom;
4
4
use rustc_middle:: ty:: layout:: { self , LayoutOf , TyAndLayout } ;
5
5
use rustc_middle:: ty:: Instance ;
6
6
use rustc_middle:: { mir, ty} ;
7
- use rustc_span:: source_map:: Span ;
8
7
use rustc_target:: spec:: abi:: Abi ;
9
8
10
9
use super :: {
@@ -71,14 +70,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
71
70
Some ( ( dest, ret) ) => Some ( ( self . eval_place ( dest) ?, * ret) ) ,
72
71
None => None ,
73
72
} ;
74
- self . eval_fn_call (
75
- fn_val,
76
- terminator. source_info . span ,
77
- abi,
78
- & args[ ..] ,
79
- ret,
80
- * cleanup,
81
- ) ?;
73
+ self . eval_fn_call ( fn_val, abi, & args[ ..] , ret, * cleanup) ?;
82
74
}
83
75
84
76
Drop { ref location, target, unwind } => {
@@ -88,7 +80,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
88
80
trace ! ( "TerminatorKind::drop: {:?}, type {}" , location, ty) ;
89
81
90
82
let instance = Instance :: resolve_drop_in_place ( * self . tcx , ty) ;
91
- self . drop_in_place ( place, instance, terminator . source_info . span , target, unwind) ?;
83
+ self . drop_in_place ( place, instance, target, unwind) ?;
92
84
}
93
85
94
86
Assert { ref cond, expected, ref msg, target, cleanup } => {
@@ -196,7 +188,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
196
188
fn eval_fn_call (
197
189
& mut self ,
198
190
fn_val : FnVal < ' tcx , M :: ExtraFnVal > ,
199
- span : Span ,
200
191
caller_abi : Abi ,
201
192
args : & [ OpTy < ' tcx , M :: PointerTag > ] ,
202
193
ret : Option < ( PlaceTy < ' tcx , M :: PointerTag > , mir:: BasicBlock ) > ,
@@ -242,7 +233,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
242
233
match instance. def {
243
234
ty:: InstanceDef :: Intrinsic ( ..) => {
244
235
assert ! ( caller_abi == Abi :: RustIntrinsic || caller_abi == Abi :: PlatformIntrinsic ) ;
245
- M :: call_intrinsic ( self , span , instance, args, ret, unwind)
236
+ M :: call_intrinsic ( self , instance, args, ret, unwind)
246
237
}
247
238
ty:: InstanceDef :: VtableShim ( ..)
248
239
| ty:: InstanceDef :: ReifyShim ( ..)
@@ -252,7 +243,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
252
243
| ty:: InstanceDef :: CloneShim ( ..)
253
244
| ty:: InstanceDef :: Item ( _) => {
254
245
// We need MIR for this fn
255
- let body = match M :: find_mir_or_eval_fn ( self , span , instance, args, ret, unwind) ? {
246
+ let body = match M :: find_mir_or_eval_fn ( self , instance, args, ret, unwind) ? {
256
247
Some ( body) => body,
257
248
None => return Ok ( ( ) ) ,
258
249
} ;
@@ -406,7 +397,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
406
397
OpTy :: from ( ImmTy { layout : this_receiver_ptr, imm : receiver_place. ptr . into ( ) } ) ;
407
398
trace ! ( "Patched self operand to {:#?}" , args[ 0 ] ) ;
408
399
// recurse with concrete function
409
- self . eval_fn_call ( drop_fn, span , caller_abi, & args, ret, unwind)
400
+ self . eval_fn_call ( drop_fn, caller_abi, & args, ret, unwind)
410
401
}
411
402
}
412
403
}
@@ -415,7 +406,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
415
406
& mut self ,
416
407
place : PlaceTy < ' tcx , M :: PointerTag > ,
417
408
instance : ty:: Instance < ' tcx > ,
418
- span : Span ,
419
409
target : mir:: BasicBlock ,
420
410
unwind : Option < mir:: BasicBlock > ,
421
411
) -> InterpResult < ' tcx > {
@@ -443,7 +433,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
443
433
444
434
self . eval_fn_call (
445
435
FnVal :: Instance ( instance) ,
446
- span,
447
436
Abi :: Rust ,
448
437
& [ arg. into ( ) ] ,
449
438
Some ( ( dest. into ( ) , target) ) ,
0 commit comments