@@ -8,7 +8,6 @@ use std::fmt;
8
8
use std:: path:: Path ;
9
9
use std:: process;
10
10
11
- use either:: Either ;
12
11
use rand:: rngs:: StdRng ;
13
12
use rand:: Rng ;
14
13
use rand:: SeedableRng ;
@@ -957,7 +956,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
957
956
// to run extra MIR), and Ok(Some(body)) if we found MIR to run for the
958
957
// foreign function
959
958
// Any needed call to `goto_block` will be performed by `emulate_foreign_item`.
960
- let args = ecx. copy_fn_args ( args) ? ; // FIXME: Should `InPlace` arguments be reset to uninit?
959
+ let args = ecx. copy_fn_args ( args) ; // FIXME: Should `InPlace` arguments be reset to uninit?
961
960
let link_name = ecx. item_link_name ( instance. def_id ( ) ) ;
962
961
return ecx. emulate_foreign_item ( link_name, abi, & args, dest, ret, unwind) ;
963
962
}
@@ -976,7 +975,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
976
975
ret : Option < mir:: BasicBlock > ,
977
976
unwind : mir:: UnwindAction ,
978
977
) -> InterpResult < ' tcx > {
979
- let args = ecx. copy_fn_args ( args) ? ; // FIXME: Should `InPlace` arguments be reset to uninit?
978
+ let args = ecx. copy_fn_args ( args) ; // FIXME: Should `InPlace` arguments be reset to uninit?
980
979
ecx. emulate_dyn_sym ( fn_val, abi, & args, dest, ret, unwind)
981
980
}
982
981
@@ -1329,18 +1328,12 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
1329
1328
1330
1329
fn protect_in_place_function_argument (
1331
1330
ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
1332
- place : & PlaceTy < ' tcx , Provenance > ,
1331
+ place : & MPlaceTy < ' tcx , Provenance > ,
1333
1332
) -> InterpResult < ' tcx > {
1334
1333
// If we have a borrow tracker, we also have it set up protection so that all reads *and
1335
1334
// writes* during this call are insta-UB.
1336
1335
let protected_place = if ecx. machine . borrow_tracker . is_some ( ) {
1337
- // Have to do `to_op` first because a `Place::Local` doesn't imply the local doesn't have an address.
1338
- if let Either :: Left ( place) = ecx. place_to_op ( place) ?. as_mplace_or_imm ( ) {
1339
- ecx. protect_place ( & place) ?. into ( )
1340
- } else {
1341
- // Locals that don't have their address taken are as protected as they can ever be.
1342
- place. clone ( )
1343
- }
1336
+ ecx. protect_place ( place) ?
1344
1337
} else {
1345
1338
// No borrow tracker.
1346
1339
place. clone ( )
0 commit comments