Skip to content

Commit 5721927

Browse files
committed
rustup
1 parent e8095d0 commit 5721927

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4603ac31b0655793a82f110f544dc1c6abc57bb7
1+
29c5a028b0c92aa5da6a8eb6d6585a389fcf1035

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
258258
// Push frame.
259259
let mir = this.load_mir(f.def, None)?;
260260
let dest = match dest {
261-
Some(dest) => *dest,
261+
Some(dest) => dest.clone(),
262262
None => MPlaceTy::fake_alloc_zst(this.layout_of(mir.return_ty())?).into(),
263263
};
264264
this.push_stack_frame(f, mir, &dest, stack_pop)?;

src/shims/intrinsics/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
224224
"frem_fast" => mir::BinOp::Rem,
225225
_ => bug!(),
226226
};
227-
let float_finite = |x: ImmTy<'tcx, _>| -> InterpResult<'tcx, bool> {
227+
let float_finite = |x: &ImmTy<'tcx, _>| -> InterpResult<'tcx, bool> {
228228
Ok(match x.layout.ty.kind() {
229229
ty::Float(FloatTy::F32) => x.to_scalar()?.to_f32()?.is_finite(),
230230
ty::Float(FloatTy::F64) => x.to_scalar()?.to_f64()?.is_finite(),
@@ -234,7 +234,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
234234
),
235235
})
236236
};
237-
match (float_finite(a)?, float_finite(b)?) {
237+
match (float_finite(&a)?, float_finite(&b)?) {
238238
(false, false) => throw_ub_format!(
239239
"`{intrinsic_name}` intrinsic called with non-finite value as both parameters",
240240
),

src/shims/panic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
108108
// when we pop this frame.
109109
if this.tcx.sess.panic_strategy() == PanicStrategy::Unwind {
110110
this.frame_mut().extra.catch_unwind =
111-
Some(CatchUnwindData { catch_fn, data, dest: *dest, ret });
111+
Some(CatchUnwindData { catch_fn, data, dest: dest.clone(), ret });
112112
}
113113

114114
Ok(())

src/shims/unix/linux/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ pub fn futex<'tcx>(
188188
this.write_scalar(Scalar::from_machine_isize(0, this), dest)?;
189189
// Register a timeout callback if a timeout was specified.
190190
// This callback will override the return value when the timeout triggers.
191-
let dest = *dest;
192191
if let Some(timeout_time) = timeout_time {
192+
let dest = dest.clone();
193193
this.register_timeout_callback(
194194
thread,
195195
timeout_time,

src/shims/unix/sync.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
828828
// We return success for now and override it in the timeout callback.
829829
this.write_scalar(Scalar::from_i32(0), dest)?;
830830

831-
let dest = *dest;
832-
833831
// Register the timeout callback.
832+
let dest = dest.clone();
834833
this.register_timeout_callback(
835834
active_thread,
836835
timeout_time,

src/stacked_borrows/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
985985
// See https://github.com/rust-lang/unsafe-code-guidelines/issues/276.
986986
let size = match size {
987987
Some(size) => size,
988-
None => return Ok(*val),
988+
None => return Ok(val.clone()),
989989
};
990990

991991
// Compute new borrow.
@@ -1116,13 +1116,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
11161116
/// explicit. Also see <https://github.com/rust-lang/rust/issues/71117>.
11171117
fn retag_return_place(&mut self) -> InterpResult<'tcx> {
11181118
let this = self.eval_context_mut();
1119-
let return_place = this.frame_mut().return_place;
1119+
let return_place = &this.frame().return_place;
11201120
if return_place.layout.is_zst() {
11211121
// There may not be any memory here, nothing to do.
11221122
return Ok(());
11231123
}
11241124
// We need this to be in-memory to use tagged pointers.
1125-
let return_place = this.force_allocation(&return_place)?;
1125+
let return_place = this.force_allocation(&return_place.clone())?;
11261126

11271127
// We have to turn the place into a pointer to use the existing code.
11281128
// (The pointer type does not matter, so we use a raw pointer.)

0 commit comments

Comments
 (0)