Skip to content

Commit 3f0b6a0

Browse files
committed
consistently use MPlaceTy for return places
1 parent 8de72e4 commit 3f0b6a0

32 files changed

+133
-145
lines changed

compiler/rustc_const_eval/src/const_eval/machine.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::errors::{LongRunning, LongRunningWarn};
2424
use crate::fluent_generated as fluent;
2525
use crate::interpret::{
2626
self, compile_time_machine, AllocId, AllocRange, ConstAllocation, CtfeProvenance, FnArg, FnVal,
27-
Frame, ImmTy, InterpCx, InterpResult, OpTy, PlaceTy, Pointer, PointerArithmetic, Scalar,
27+
Frame, ImmTy, InterpCx, InterpResult, MPlaceTy, OpTy, Pointer, PointerArithmetic, Scalar,
2828
};
2929

3030
use super::error::*;
@@ -219,7 +219,7 @@ impl<'mir, 'tcx: 'mir> CompileTimeEvalContext<'mir, 'tcx> {
219219
&mut self,
220220
instance: ty::Instance<'tcx>,
221221
args: &[FnArg<'tcx>],
222-
dest: &PlaceTy<'tcx>,
222+
dest: &MPlaceTy<'tcx>,
223223
ret: Option<mir::BasicBlock>,
224224
) -> InterpResult<'tcx, Option<ty::Instance<'tcx>>> {
225225
let def_id = instance.def_id();
@@ -280,7 +280,7 @@ impl<'mir, 'tcx: 'mir> CompileTimeEvalContext<'mir, 'tcx> {
280280
&mut self,
281281
instance: ty::Instance<'tcx>,
282282
args: &[OpTy<'tcx>],
283-
dest: &PlaceTy<'tcx>,
283+
dest: &MPlaceTy<'tcx>,
284284
ret: Option<mir::BasicBlock>,
285285
) -> InterpResult<'tcx, ControlFlow<()>> {
286286
assert_eq!(args.len(), 2);
@@ -410,7 +410,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
410410
orig_instance: ty::Instance<'tcx>,
411411
_abi: CallAbi,
412412
args: &[FnArg<'tcx>],
413-
dest: &PlaceTy<'tcx>,
413+
dest: &MPlaceTy<'tcx>,
414414
ret: Option<mir::BasicBlock>,
415415
_unwind: mir::UnwindAction, // unwinding is not supported in consts
416416
) -> InterpResult<'tcx, Option<(&'mir mir::Body<'tcx>, ty::Instance<'tcx>)>> {
@@ -455,7 +455,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
455455
ecx: &mut InterpCx<'mir, 'tcx, Self>,
456456
instance: ty::Instance<'tcx>,
457457
args: &[OpTy<'tcx>],
458-
dest: &PlaceTy<'tcx, Self::Provenance>,
458+
dest: &MPlaceTy<'tcx, Self::Provenance>,
459459
target: Option<mir::BasicBlock>,
460460
_unwind: mir::UnwindAction,
461461
) -> InterpResult<'tcx> {

compiler/rustc_const_eval/src/interpret/eval_context.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -771,19 +771,18 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
771771
&mut self,
772772
instance: ty::Instance<'tcx>,
773773
body: &'mir mir::Body<'tcx>,
774-
return_place: &PlaceTy<'tcx, M::Provenance>,
774+
return_place: &MPlaceTy<'tcx, M::Provenance>,
775775
return_to_block: StackPopCleanup,
776776
) -> InterpResult<'tcx> {
777777
trace!("body: {:#?}", body);
778778
let dead_local = LocalState { value: LocalValue::Dead, layout: Cell::new(None) };
779779
let locals = IndexVec::from_elem(dead_local, &body.local_decls);
780-
let return_place = self.force_allocation(return_place)?; // avoid a long-lived `PlaceTy`
781780
// First push a stack frame so we have access to the local args
782781
let pre_frame = Frame {
783782
body,
784783
loc: Right(body.span), // Span used for errors caused during preamble.
785784
return_to_block,
786-
return_place,
785+
return_place: return_place.clone(),
787786
locals,
788787
instance,
789788
tracing_span: SpanGuard::new(),

compiler/rustc_const_eval/src/interpret/intrinsics.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rustc_span::symbol::{sym, Symbol};
2121
use rustc_target::abi::Size;
2222

2323
use super::{
24-
util::ensure_monomorphic_enough, CheckInAllocMsg, ImmTy, InterpCx, Machine, OpTy, PlaceTy,
24+
util::ensure_monomorphic_enough, CheckInAllocMsg, ImmTy, InterpCx, MPlaceTy, Machine, OpTy,
2525
Pointer,
2626
};
2727

@@ -104,7 +104,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
104104
&mut self,
105105
instance: ty::Instance<'tcx>,
106106
args: &[OpTy<'tcx, M::Provenance>],
107-
dest: &PlaceTy<'tcx, M::Provenance>,
107+
dest: &MPlaceTy<'tcx, M::Provenance>,
108108
ret: Option<mir::BasicBlock>,
109109
) -> InterpResult<'tcx, bool> {
110110
let instance_args = instance.args;
@@ -377,7 +377,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
377377
let index = u64::from(self.read_scalar(&args[1])?.to_u32()?);
378378
let elem = &args[2];
379379
let (input, input_len) = self.operand_to_simd(&args[0])?;
380-
let (dest, dest_len) = self.place_to_simd(dest)?;
380+
let (dest, dest_len) = self.mplace_to_simd(dest)?;
381381
assert_eq!(input_len, dest_len, "Return vector length must match input length");
382382
// Bounds are not checked by typeck so we have to do it ourselves.
383383
if index >= input_len {
@@ -430,7 +430,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
430430
_ => return Ok(false),
431431
}
432432

433-
trace!("{:?}", self.dump_place(dest));
433+
trace!("{:?}", self.dump_place(&dest.clone().into()));
434434
self.go_to_block(ret);
435435
Ok(true)
436436
}
@@ -488,7 +488,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
488488
&mut self,
489489
a: &ImmTy<'tcx, M::Provenance>,
490490
b: &ImmTy<'tcx, M::Provenance>,
491-
dest: &PlaceTy<'tcx, M::Provenance>,
491+
dest: &MPlaceTy<'tcx, M::Provenance>,
492492
) -> InterpResult<'tcx> {
493493
assert_eq!(a.layout.ty, b.layout.ty);
494494
assert!(matches!(a.layout.ty.kind(), ty::Int(..) | ty::Uint(..)));
@@ -506,7 +506,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
506506
)
507507
}
508508
// `Rem` says this is all right, so we can let `Div` do its job.
509-
self.binop_ignore_overflow(BinOp::Div, a, b, dest)
509+
self.binop_ignore_overflow(BinOp::Div, a, b, &dest.clone().into())
510510
}
511511

512512
pub fn saturating_arith(

compiler/rustc_const_eval/src/interpret/machine.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized {
196196
instance: ty::Instance<'tcx>,
197197
abi: CallAbi,
198198
args: &[FnArg<'tcx, Self::Provenance>],
199-
destination: &PlaceTy<'tcx, Self::Provenance>,
199+
destination: &MPlaceTy<'tcx, Self::Provenance>,
200200
target: Option<mir::BasicBlock>,
201201
unwind: mir::UnwindAction,
202202
) -> InterpResult<'tcx, Option<(&'mir mir::Body<'tcx>, ty::Instance<'tcx>)>>;
@@ -208,7 +208,7 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized {
208208
fn_val: Self::ExtraFnVal,
209209
abi: CallAbi,
210210
args: &[FnArg<'tcx, Self::Provenance>],
211-
destination: &PlaceTy<'tcx, Self::Provenance>,
211+
destination: &MPlaceTy<'tcx, Self::Provenance>,
212212
target: Option<mir::BasicBlock>,
213213
unwind: mir::UnwindAction,
214214
) -> InterpResult<'tcx>;
@@ -219,7 +219,7 @@ pub trait Machine<'mir, 'tcx: 'mir>: Sized {
219219
ecx: &mut InterpCx<'mir, 'tcx, Self>,
220220
instance: ty::Instance<'tcx>,
221221
args: &[OpTy<'tcx, Self::Provenance>],
222-
destination: &PlaceTy<'tcx, Self::Provenance>,
222+
destination: &MPlaceTy<'tcx, Self::Provenance>,
223223
target: Option<mir::BasicBlock>,
224224
unwind: mir::UnwindAction,
225225
) -> InterpResult<'tcx>;
@@ -584,7 +584,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
584584
fn_val: !,
585585
_abi: CallAbi,
586586
_args: &[FnArg<$tcx>],
587-
_destination: &PlaceTy<$tcx, Self::Provenance>,
587+
_destination: &MPlaceTy<$tcx, Self::Provenance>,
588588
_target: Option<mir::BasicBlock>,
589589
_unwind: mir::UnwindAction,
590590
) -> InterpResult<$tcx> {

compiler/rustc_const_eval/src/interpret/place.rs

-10
Original file line numberDiff line numberDiff line change
@@ -500,16 +500,6 @@ where
500500
Ok((mplace, len))
501501
}
502502

503-
/// Converts a repr(simd) place into a place where `place_index` accesses the SIMD elements.
504-
/// Also returns the number of elements.
505-
pub fn place_to_simd(
506-
&mut self,
507-
place: &PlaceTy<'tcx, M::Provenance>,
508-
) -> InterpResult<'tcx, (MPlaceTy<'tcx, M::Provenance>, u64)> {
509-
let mplace = self.force_allocation(place)?;
510-
self.mplace_to_simd(&mplace)
511-
}
512-
513503
pub fn local_to_place(
514504
&self,
515505
frame: usize,

compiler/rustc_const_eval/src/interpret/terminator.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
153153
),
154154
};
155155

156-
let destination = self.eval_place(destination)?;
156+
let destination = self.force_allocation(&self.eval_place(destination)?)?;
157157
self.eval_fn_call(
158158
fn_val,
159159
(fn_sig.abi, fn_abi),
@@ -503,7 +503,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
503503
(caller_abi, caller_fn_abi): (Abi, &FnAbi<'tcx, Ty<'tcx>>),
504504
args: &[FnArg<'tcx, M::Provenance>],
505505
with_caller_location: bool,
506-
destination: &PlaceTy<'tcx, M::Provenance>,
506+
destination: &MPlaceTy<'tcx, M::Provenance>,
507507
target: Option<mir::BasicBlock>,
508508
mut unwind: mir::UnwindAction,
509509
) -> InterpResult<'tcx> {
@@ -732,7 +732,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
732732
});
733733
}
734734
// Protect return place for in-place return value passing.
735-
M::protect_in_place_function_argument(self, destination)?;
735+
M::protect_in_place_function_argument(self, &destination.clone().into())?;
736736

737737
// Don't forget to mark "initially live" locals as live.
738738
self.storage_live_for_always_live_locals()?;

compiler/rustc_mir_transform/src/dataflow_const_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ impl<'mir, 'tcx: 'mir> rustc_const_eval::interpret::Machine<'mir, 'tcx> for Dumm
929929
_instance: ty::Instance<'tcx>,
930930
_abi: rustc_target::spec::abi::Abi,
931931
_args: &[rustc_const_eval::interpret::FnArg<'tcx, Self::Provenance>],
932-
_destination: &rustc_const_eval::interpret::PlaceTy<'tcx, Self::Provenance>,
932+
_destination: &rustc_const_eval::interpret::MPlaceTy<'tcx, Self::Provenance>,
933933
_target: Option<BasicBlock>,
934934
_unwind: UnwindAction,
935935
) -> interpret::InterpResult<'tcx, Option<(&'mir Body<'tcx>, ty::Instance<'tcx>)>> {
@@ -947,7 +947,7 @@ impl<'mir, 'tcx: 'mir> rustc_const_eval::interpret::Machine<'mir, 'tcx> for Dumm
947947
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
948948
_instance: ty::Instance<'tcx>,
949949
_args: &[rustc_const_eval::interpret::OpTy<'tcx, Self::Provenance>],
950-
_destination: &rustc_const_eval::interpret::PlaceTy<'tcx, Self::Provenance>,
950+
_destination: &rustc_const_eval::interpret::MPlaceTy<'tcx, Self::Provenance>,
951951
_target: Option<BasicBlock>,
952952
_unwind: UnwindAction,
953953
) -> interpret::InterpResult<'tcx> {

src/tools/miri/src/helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
381381
f: ty::Instance<'tcx>,
382382
caller_abi: Abi,
383383
args: &[Immediate<Provenance>],
384-
dest: Option<&PlaceTy<'tcx, Provenance>>,
384+
dest: Option<&MPlaceTy<'tcx, Provenance>>,
385385
stack_pop: StackPopCleanup,
386386
) -> InterpResult<'tcx> {
387387
let this = self.eval_context_mut();

src/tools/miri/src/machine.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
950950
instance: ty::Instance<'tcx>,
951951
abi: Abi,
952952
args: &[FnArg<'tcx, Provenance>],
953-
dest: &PlaceTy<'tcx, Provenance>,
953+
dest: &MPlaceTy<'tcx, Provenance>,
954954
ret: Option<mir::BasicBlock>,
955955
unwind: mir::UnwindAction,
956956
) -> InterpResult<'tcx, Option<(&'mir mir::Body<'tcx>, ty::Instance<'tcx>)>> {
@@ -977,7 +977,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
977977
fn_val: DynSym,
978978
abi: Abi,
979979
args: &[FnArg<'tcx, Provenance>],
980-
dest: &PlaceTy<'tcx, Provenance>,
980+
dest: &MPlaceTy<'tcx, Provenance>,
981981
ret: Option<mir::BasicBlock>,
982982
unwind: mir::UnwindAction,
983983
) -> InterpResult<'tcx> {
@@ -990,7 +990,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
990990
ecx: &mut MiriInterpCx<'mir, 'tcx>,
991991
instance: ty::Instance<'tcx>,
992992
args: &[OpTy<'tcx, Provenance>],
993-
dest: &PlaceTy<'tcx, Provenance>,
993+
dest: &MPlaceTy<'tcx, Provenance>,
994994
ret: Option<mir::BasicBlock>,
995995
unwind: mir::UnwindAction,
996996
) -> InterpResult<'tcx> {

src/tools/miri/src/shims/backtrace.rs

+10-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
1212
abi: Abi,
1313
link_name: Symbol,
1414
args: &[OpTy<'tcx, Provenance>],
15-
dest: &PlaceTy<'tcx, Provenance>,
15+
dest: &MPlaceTy<'tcx, Provenance>,
1616
) -> InterpResult<'tcx> {
1717
let this = self.eval_context_mut();
1818
let [flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
@@ -32,7 +32,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
3232
abi: Abi,
3333
link_name: Symbol,
3434
args: &[OpTy<'tcx, Provenance>],
35-
dest: &PlaceTy<'tcx, Provenance>,
35+
dest: &MPlaceTy<'tcx, Provenance>,
3636
) -> InterpResult<'tcx> {
3737
let this = self.eval_context_mut();
3838
let tcx = this.tcx;
@@ -145,7 +145,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
145145
abi: Abi,
146146
link_name: Symbol,
147147
args: &[OpTy<'tcx, Provenance>],
148-
dest: &PlaceTy<'tcx, Provenance>,
148+
dest: &MPlaceTy<'tcx, Provenance>,
149149
) -> InterpResult<'tcx> {
150150
let this = self.eval_context_mut();
151151
let [ptr, flags] = this.check_shim(abi, Abi::Rust, link_name, args)?;
@@ -174,7 +174,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
174174
// `lo.col` is 0-based - add 1 to make it 1-based for the caller.
175175
let colno: u32 = u32::try_from(lo.col.0.saturating_add(1)).unwrap_or(0);
176176

177-
let dest = this.force_allocation(dest)?;
178177
if let ty::Adt(adt, _) = dest.layout.ty.kind() {
179178
if !adt.repr().c() {
180179
throw_ub_format!(
@@ -191,29 +190,29 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
191190
let filename_alloc =
192191
this.allocate_str(&filename, MiriMemoryKind::Rust.into(), Mutability::Mut)?;
193192

194-
this.write_immediate(name_alloc.to_ref(this), &this.project_field(&dest, 0)?)?;
195-
this.write_immediate(filename_alloc.to_ref(this), &this.project_field(&dest, 1)?)?;
193+
this.write_immediate(name_alloc.to_ref(this), &this.project_field(dest, 0)?)?;
194+
this.write_immediate(filename_alloc.to_ref(this), &this.project_field(dest, 1)?)?;
196195
}
197196
1 => {
198197
this.write_scalar(
199198
Scalar::from_target_usize(name.len().try_into().unwrap(), this),
200-
&this.project_field(&dest, 0)?,
199+
&this.project_field(dest, 0)?,
201200
)?;
202201
this.write_scalar(
203202
Scalar::from_target_usize(filename.len().try_into().unwrap(), this),
204-
&this.project_field(&dest, 1)?,
203+
&this.project_field(dest, 1)?,
205204
)?;
206205
}
207206
_ => throw_unsup_format!("unknown `miri_resolve_frame` flags {}", flags),
208207
}
209208

210-
this.write_scalar(Scalar::from_u32(lineno), &this.project_field(&dest, 2)?)?;
211-
this.write_scalar(Scalar::from_u32(colno), &this.project_field(&dest, 3)?)?;
209+
this.write_scalar(Scalar::from_u32(lineno), &this.project_field(dest, 2)?)?;
210+
this.write_scalar(Scalar::from_u32(colno), &this.project_field(dest, 3)?)?;
212211

213212
// Support a 4-field struct for now - this is deprecated
214213
// and slated for removal.
215214
if num_fields == 5 {
216-
this.write_pointer(fn_ptr, &this.project_field(&dest, 4)?)?;
215+
this.write_pointer(fn_ptr, &this.project_field(dest, 4)?)?;
217216
}
218217

219218
Ok(())

src/tools/miri/src/shims/ffi_support.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
7070
fn call_external_c_and_store_return<'a>(
7171
&mut self,
7272
link_name: Symbol,
73-
dest: &PlaceTy<'tcx, Provenance>,
73+
dest: &MPlaceTy<'tcx, Provenance>,
7474
ptr: CodePtr,
7575
libffi_args: Vec<libffi::high::Arg<'a>>,
7676
) -> InterpResult<'tcx, ()> {
@@ -205,7 +205,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
205205
fn call_external_c_fct(
206206
&mut self,
207207
link_name: Symbol,
208-
dest: &PlaceTy<'tcx, Provenance>,
208+
dest: &MPlaceTy<'tcx, Provenance>,
209209
args: &[OpTy<'tcx, Provenance>],
210210
) -> InterpResult<'tcx, bool> {
211211
// Get the pointer to the function in the shared object file if it exists.

src/tools/miri/src/shims/foreign_items.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
5757
link_name: Symbol,
5858
abi: Abi,
5959
args: &[OpTy<'tcx, Provenance>],
60-
dest: &PlaceTy<'tcx, Provenance>,
60+
dest: &MPlaceTy<'tcx, Provenance>,
6161
ret: Option<mir::BasicBlock>,
6262
unwind: mir::UnwindAction,
6363
) -> InterpResult<'tcx, Option<(&'mir mir::Body<'tcx>, ty::Instance<'tcx>)>> {
@@ -123,7 +123,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
123123
// Second: functions that return immediately.
124124
match this.emulate_foreign_item_inner(link_name, abi, args, dest)? {
125125
EmulateForeignItemResult::NeedsJumping => {
126-
trace!("{:?}", this.dump_place(dest));
126+
trace!("{:?}", this.dump_place(&dest.clone().into()));
127127
this.go_to_block(ret);
128128
}
129129
EmulateForeignItemResult::AlreadyJumped => (),
@@ -149,7 +149,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
149149
sym: DynSym,
150150
abi: Abi,
151151
args: &[OpTy<'tcx, Provenance>],
152-
dest: &PlaceTy<'tcx, Provenance>,
152+
dest: &MPlaceTy<'tcx, Provenance>,
153153
ret: Option<mir::BasicBlock>,
154154
unwind: mir::UnwindAction,
155155
) -> InterpResult<'tcx> {
@@ -401,7 +401,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
401401
link_name: Symbol,
402402
abi: Abi,
403403
args: &[OpTy<'tcx, Provenance>],
404-
dest: &PlaceTy<'tcx, Provenance>,
404+
dest: &MPlaceTy<'tcx, Provenance>,
405405
) -> InterpResult<'tcx, EmulateForeignItemResult> {
406406
let this = self.eval_context_mut();
407407

@@ -1085,7 +1085,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
10851085
let [op] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
10861086

10871087
let (op, op_len) = this.operand_to_simd(op)?;
1088-
let (dest, dest_len) = this.place_to_simd(dest)?;
1088+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
10891089

10901090
assert_eq!(dest_len, op_len);
10911091

0 commit comments

Comments
 (0)