Skip to content

Commit ae3af12

Browse files
committed
Auto merge of #121985 - RalfJung:interpret-return-place, r=oli-obk
interpret: avoid a long-lived PlaceTy in stack frames `PlaceTy` uses a representation that's not very stable under changes to the stack. I'd feel better if we didn't have one in the long-term machine state. r? `@oli-obk`
2 parents 0bc3cb5 + 708b115 commit ae3af12

25 files changed

+111
-112
lines changed

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/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/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/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/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

src/shims/intrinsics/atomic.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
1818
&mut self,
1919
intrinsic_name: &str,
2020
args: &[OpTy<'tcx, Provenance>],
21-
dest: &PlaceTy<'tcx, Provenance>,
21+
dest: &MPlaceTy<'tcx, Provenance>,
2222
) -> InterpResult<'tcx> {
2323
let this = self.eval_context_mut();
2424

@@ -124,7 +124,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
124124
fn atomic_load(
125125
&mut self,
126126
args: &[OpTy<'tcx, Provenance>],
127-
dest: &PlaceTy<'tcx, Provenance>,
127+
dest: &MPlaceTy<'tcx, Provenance>,
128128
atomic: AtomicReadOrd,
129129
) -> InterpResult<'tcx> {
130130
let this = self.eval_context_mut();
@@ -181,7 +181,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
181181
fn atomic_rmw_op(
182182
&mut self,
183183
args: &[OpTy<'tcx, Provenance>],
184-
dest: &PlaceTy<'tcx, Provenance>,
184+
dest: &MPlaceTy<'tcx, Provenance>,
185185
atomic_op: AtomicOp,
186186
atomic: AtomicRwOrd,
187187
) -> InterpResult<'tcx> {
@@ -223,7 +223,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
223223
fn atomic_exchange(
224224
&mut self,
225225
args: &[OpTy<'tcx, Provenance>],
226-
dest: &PlaceTy<'tcx, Provenance>,
226+
dest: &MPlaceTy<'tcx, Provenance>,
227227
atomic: AtomicRwOrd,
228228
) -> InterpResult<'tcx> {
229229
let this = self.eval_context_mut();
@@ -240,7 +240,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
240240
fn atomic_compare_exchange_impl(
241241
&mut self,
242242
args: &[OpTy<'tcx, Provenance>],
243-
dest: &PlaceTy<'tcx, Provenance>,
243+
dest: &MPlaceTy<'tcx, Provenance>,
244244
success: AtomicRwOrd,
245245
fail: AtomicReadOrd,
246246
can_fail_spuriously: bool,
@@ -269,7 +269,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
269269
fn atomic_compare_exchange(
270270
&mut self,
271271
args: &[OpTy<'tcx, Provenance>],
272-
dest: &PlaceTy<'tcx, Provenance>,
272+
dest: &MPlaceTy<'tcx, Provenance>,
273273
success: AtomicRwOrd,
274274
fail: AtomicReadOrd,
275275
) -> InterpResult<'tcx> {
@@ -279,7 +279,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
279279
fn atomic_compare_exchange_weak(
280280
&mut self,
281281
args: &[OpTy<'tcx, Provenance>],
282-
dest: &PlaceTy<'tcx, Provenance>,
282+
dest: &MPlaceTy<'tcx, Provenance>,
283283
success: AtomicRwOrd,
284284
fail: AtomicReadOrd,
285285
) -> InterpResult<'tcx> {

src/shims/intrinsics/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
2323
&mut self,
2424
instance: ty::Instance<'tcx>,
2525
args: &[OpTy<'tcx, Provenance>],
26-
dest: &PlaceTy<'tcx, Provenance>,
26+
dest: &MPlaceTy<'tcx, Provenance>,
2727
ret: Option<mir::BasicBlock>,
2828
_unwind: mir::UnwindAction,
2929
) -> InterpResult<'tcx> {
@@ -61,7 +61,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
6161
// The rest jumps to `ret` immediately.
6262
this.emulate_intrinsic_by_name(intrinsic_name, instance.args, args, dest)?;
6363

64-
trace!("{:?}", this.dump_place(dest));
64+
trace!("{:?}", this.dump_place(&dest.clone().into()));
6565
this.go_to_block(ret);
6666
Ok(())
6767
}
@@ -72,7 +72,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
7272
intrinsic_name: &str,
7373
generic_args: ty::GenericArgsRef<'tcx>,
7474
args: &[OpTy<'tcx, Provenance>],
75-
dest: &PlaceTy<'tcx, Provenance>,
75+
dest: &MPlaceTy<'tcx, Provenance>,
7676
) -> InterpResult<'tcx> {
7777
let this = self.eval_context_mut();
7878

src/shims/intrinsics/simd.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
2121
intrinsic_name: &str,
2222
generic_args: ty::GenericArgsRef<'tcx>,
2323
args: &[OpTy<'tcx, Provenance>],
24-
dest: &PlaceTy<'tcx, Provenance>,
24+
dest: &MPlaceTy<'tcx, Provenance>,
2525
) -> InterpResult<'tcx> {
2626
let this = self.eval_context_mut();
2727
match intrinsic_name {
@@ -40,7 +40,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
4040
=> {
4141
let [op] = check_arg_count(args)?;
4242
let (op, op_len) = this.operand_to_simd(op)?;
43-
let (dest, dest_len) = this.place_to_simd(dest)?;
43+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
4444

4545
assert_eq!(dest_len, op_len);
4646

@@ -167,7 +167,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
167167
let [left, right] = check_arg_count(args)?;
168168
let (left, left_len) = this.operand_to_simd(left)?;
169169
let (right, right_len) = this.operand_to_simd(right)?;
170-
let (dest, dest_len) = this.place_to_simd(dest)?;
170+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
171171

172172
assert_eq!(dest_len, left_len);
173173
assert_eq!(dest_len, right_len);
@@ -255,7 +255,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
255255
let (a, a_len) = this.operand_to_simd(a)?;
256256
let (b, b_len) = this.operand_to_simd(b)?;
257257
let (c, c_len) = this.operand_to_simd(c)?;
258-
let (dest, dest_len) = this.place_to_simd(dest)?;
258+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
259259

260260
assert_eq!(dest_len, a_len);
261261
assert_eq!(dest_len, b_len);
@@ -390,7 +390,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
390390
let (mask, mask_len) = this.operand_to_simd(mask)?;
391391
let (yes, yes_len) = this.operand_to_simd(yes)?;
392392
let (no, no_len) = this.operand_to_simd(no)?;
393-
let (dest, dest_len) = this.place_to_simd(dest)?;
393+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
394394

395395
assert_eq!(dest_len, mask_len);
396396
assert_eq!(dest_len, yes_len);
@@ -411,7 +411,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
411411
let [mask, yes, no] = check_arg_count(args)?;
412412
let (yes, yes_len) = this.operand_to_simd(yes)?;
413413
let (no, no_len) = this.operand_to_simd(no)?;
414-
let (dest, dest_len) = this.place_to_simd(dest)?;
414+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
415415
let bitmask_len = dest_len.next_multiple_of(8);
416416

417417
// The mask must be an integer or an array.
@@ -487,7 +487,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
487487
"cast" | "as" | "cast_ptr" | "expose_addr" | "from_exposed_addr" => {
488488
let [op] = check_arg_count(args)?;
489489
let (op, op_len) = this.operand_to_simd(op)?;
490-
let (dest, dest_len) = this.place_to_simd(dest)?;
490+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
491491

492492
assert_eq!(dest_len, op_len);
493493

@@ -545,7 +545,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
545545
let [left, right] = check_arg_count(args)?;
546546
let (left, left_len) = this.operand_to_simd(left)?;
547547
let (right, right_len) = this.operand_to_simd(right)?;
548-
let (dest, dest_len) = this.place_to_simd(dest)?;
548+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
549549

550550
let index = generic_args[2]
551551
.expect_const()
@@ -582,7 +582,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
582582
let [left, right, index] = check_arg_count(args)?;
583583
let (left, left_len) = this.operand_to_simd(left)?;
584584
let (right, right_len) = this.operand_to_simd(right)?;
585-
let (dest, dest_len) = this.place_to_simd(dest)?;
585+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
586586

587587
// `index` is an array, not a SIMD type
588588
let ty::Array(_, index_len) = index.layout.ty.kind() else {
@@ -623,7 +623,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
623623
let (passthru, passthru_len) = this.operand_to_simd(passthru)?;
624624
let (ptrs, ptrs_len) = this.operand_to_simd(ptrs)?;
625625
let (mask, mask_len) = this.operand_to_simd(mask)?;
626-
let (dest, dest_len) = this.place_to_simd(dest)?;
626+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
627627

628628
assert_eq!(dest_len, passthru_len);
629629
assert_eq!(dest_len, ptrs_len);
@@ -669,7 +669,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
669669
let (mask, mask_len) = this.operand_to_simd(mask)?;
670670
let ptr = this.read_pointer(ptr)?;
671671
let (default, default_len) = this.operand_to_simd(default)?;
672-
let (dest, dest_len) = this.place_to_simd(dest)?;
672+
let (dest, dest_len) = this.mplace_to_simd(dest)?;
673673

674674
assert_eq!(dest_len, mask_len);
675675
assert_eq!(dest_len, default_len);

src/shims/panic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct CatchUnwindData<'tcx> {
2828
/// The `data` argument for that callback.
2929
data: Scalar<Provenance>,
3030
/// The return place from the original call to `try`.
31-
dest: PlaceTy<'tcx, Provenance>,
31+
dest: MPlaceTy<'tcx, Provenance>,
3232
/// The return block from the original call to `try`.
3333
ret: mir::BasicBlock,
3434
}
@@ -72,7 +72,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
7272
fn handle_catch_unwind(
7373
&mut self,
7474
args: &[OpTy<'tcx, Provenance>],
75-
dest: &PlaceTy<'tcx, Provenance>,
75+
dest: &MPlaceTy<'tcx, Provenance>,
7676
ret: mir::BasicBlock,
7777
) -> InterpResult<'tcx> {
7878
let this = self.eval_context_mut();

src/shims/unix/foreign_items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
4444
link_name: Symbol,
4545
abi: Abi,
4646
args: &[OpTy<'tcx, Provenance>],
47-
dest: &PlaceTy<'tcx, Provenance>,
47+
dest: &MPlaceTy<'tcx, Provenance>,
4848
) -> InterpResult<'tcx, EmulateForeignItemResult> {
4949
let this = self.eval_context_mut();
5050

src/shims/unix/freebsd/foreign_items.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
1717
link_name: Symbol,
1818
abi: Abi,
1919
args: &[OpTy<'tcx, Provenance>],
20-
dest: &PlaceTy<'tcx, Provenance>,
20+
dest: &MPlaceTy<'tcx, Provenance>,
2121
) -> InterpResult<'tcx, EmulateForeignItemResult> {
2222
let this = self.eval_context_mut();
2323
match link_name.as_str() {

0 commit comments

Comments
 (0)