@@ -28,16 +28,17 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
28
28
instance : ty:: Instance < ' tcx > ,
29
29
abi : Abi ,
30
30
args : & [ OpTy < ' tcx , Tag > ] ,
31
- ret : Option < ( & PlaceTy < ' tcx , Tag > , mir:: BasicBlock ) > ,
31
+ dest : & PlaceTy < ' tcx , Tag > ,
32
+ ret : Option < mir:: BasicBlock > ,
32
33
unwind : StackPopUnwind ,
33
34
) -> InterpResult < ' tcx , Option < ( & ' mir mir:: Body < ' tcx > , ty:: Instance < ' tcx > ) > > {
34
35
let this = self . eval_context_mut ( ) ;
35
- trace ! ( "eval_fn_call: {:#?}, {:?}" , instance, ret . map ( |p| p . 0 ) ) ;
36
+ trace ! ( "eval_fn_call: {:#?}, {:?}" , instance, dest ) ;
36
37
37
38
// There are some more lang items we want to hook that CTFE does not hook (yet).
38
39
if this. tcx . lang_items ( ) . align_offset_fn ( ) == Some ( instance. def . def_id ( ) ) {
39
40
let [ ptr, align] = check_arg_count ( args) ?;
40
- if this. align_offset ( ptr, align, ret, unwind) ? {
41
+ if this. align_offset ( ptr, align, dest , ret, unwind) ? {
41
42
return Ok ( None ) ;
42
43
}
43
44
}
@@ -50,7 +51,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
50
51
// to run extra MIR), and Ok(Some(body)) if we found MIR to run for the
51
52
// foreign function
52
53
// Any needed call to `goto_block` will be performed by `emulate_foreign_item`.
53
- return this. emulate_foreign_item ( instance. def_id ( ) , abi, args, ret, unwind) ;
54
+ return this. emulate_foreign_item ( instance. def_id ( ) , abi, args, dest , ret, unwind) ;
54
55
}
55
56
56
57
// Otherwise, load the MIR.
@@ -63,11 +64,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
63
64
& mut self ,
64
65
ptr_op : & OpTy < ' tcx , Tag > ,
65
66
align_op : & OpTy < ' tcx , Tag > ,
66
- ret : Option < ( & PlaceTy < ' tcx , Tag > , mir:: BasicBlock ) > ,
67
+ dest : & PlaceTy < ' tcx , Tag > ,
68
+ ret : Option < mir:: BasicBlock > ,
67
69
unwind : StackPopUnwind ,
68
70
) -> InterpResult < ' tcx , bool > {
69
71
let this = self . eval_context_mut ( ) ;
70
- let ( dest , ret) = ret. unwrap ( ) ;
72
+ let ret = ret. unwrap ( ) ;
71
73
72
74
if this. machine . check_alignment != AlignmentCheck :: Symbolic {
73
75
// Just use actual implementation.
0 commit comments