diff --git a/src/fn_call.rs b/src/fn_call.rs index ce07b04c29c..b496a9b7d41 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -275,7 +275,7 @@ fn emulate_foreign_item( .to_owned(), ), )?; - let arg_dest = this.eval_place(&mir::Place::Local(arg_local))?; + let arg_dest = this.eval_place(&mir::Place::Base(mir::PlaceBase::Local(arg_local)))?; this.write_scalar(data, arg_dest)?; assert!(args.next().is_none(), "__rust_maybe_catch_panic argument has more arguments than expected"); diff --git a/src/lib.rs b/src/lib.rs index 8fc3efd7c23..cf6a885c605 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,11 +121,11 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>( // First argument: pointer to `main()`. let main_ptr = ecx.memory_mut().create_fn_alloc(main_instance).with_default_tag(); - let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?; + let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?; ecx.write_scalar(Scalar::Ptr(main_ptr), dest)?; // Second argument (argc): `1`. - let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?; + let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?; let argc = Scalar::from_uint(config.args.len() as u128, dest.layout.size); ecx.write_scalar(argc, dest)?; // Store argc for macOS's `_NSGetArgc`. @@ -137,7 +137,7 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>( // FIXME: extract main source file path. // Third argument (`argv`): created from `config.args`. - let dest = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?; + let dest = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?; // For Windows, construct a command string with all the aguments. let mut cmd = String::new(); for arg in config.args.iter() { @@ -437,12 +437,12 @@ fn box_alloc( // First argument: `size`. // (`0` is allowed here -- this is expected to be handled by the lang item). - let arg = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?; + let arg = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?; let size = layout.size.bytes(); ecx.write_scalar(Scalar::from_uint(size, arg.layout.size), arg)?; // Second argument: `align`. - let arg = ecx.eval_place(&mir::Place::Local(args.next().unwrap()))?; + let arg = ecx.eval_place(&mir::Place::Base(mir::PlaceBase::Local(args.next().unwrap())))?; let align = layout.align.abi.bytes(); ecx.write_scalar(Scalar::from_uint(align, arg.layout.size), arg)?; diff --git a/src/tls.rs b/src/tls.rs index 5411e021619..796c2e5f982 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -151,7 +151,7 @@ fn run_tls_dtors(&mut self) -> EvalResult<'tcx> { let arg_local = this.frame().mir.args_iter().next().ok_or_else( || EvalErrorKind::AbiViolation("TLS dtor does not take enough arguments.".to_owned()), )?; - let dest = this.eval_place(&mir::Place::Local(arg_local))?; + let dest = this.eval_place(&mir::Place::Base(mir::PlaceBase::Local(arg_local)))?; this.write_scalar(ptr, dest)?; // step until out of stackframes