@@ -8,7 +8,6 @@ use std::fmt;
88use std:: path:: Path ;
99use std:: process;
1010
11- use either:: Either ;
1211use rand:: rngs:: StdRng ;
1312use rand:: Rng ;
1413use rand:: SeedableRng ;
@@ -957,7 +956,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
957956 // to run extra MIR), and Ok(Some(body)) if we found MIR to run for the
958957 // foreign function
959958 // 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?
961960 let link_name = ecx. item_link_name ( instance. def_id ( ) ) ;
962961 return ecx. emulate_foreign_item ( link_name, abi, & args, dest, ret, unwind) ;
963962 }
@@ -976,7 +975,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
976975 ret : Option < mir:: BasicBlock > ,
977976 unwind : mir:: UnwindAction ,
978977 ) -> 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?
980979 ecx. emulate_dyn_sym ( fn_val, abi, & args, dest, ret, unwind)
981980 }
982981
@@ -1329,18 +1328,12 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
13291328
13301329 fn protect_in_place_function_argument (
13311330 ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
1332- place : & PlaceTy < ' tcx , Provenance > ,
1331+ place : & MPlaceTy < ' tcx , Provenance > ,
13331332 ) -> InterpResult < ' tcx > {
13341333 // If we have a borrow tracker, we also have it set up protection so that all reads *and
13351334 // writes* during this call are insta-UB.
13361335 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) ?. into ( )
13441337 } else {
13451338 // No borrow tracker.
13461339 place. clone ( )
0 commit comments