From 2ff1f24f2b95604b43518f334c445b9a5ab47c21 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 7 Nov 2018 10:11:16 +0100 Subject: [PATCH] bump rust --- rust-version | 2 +- src/intrinsic.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rust-version b/rust-version index 734df301d8e0..48887947cdf7 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -nightly-2018-11-05 +nightly-2018-11-07 diff --git a/src/intrinsic.rs b/src/intrinsic.rs index 9aad6f95f316..20402f4a2329 100644 --- a/src/intrinsic.rs +++ b/src/intrinsic.rs @@ -87,11 +87,11 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, ' _ if intrinsic_name.starts_with("atomic_cxchg") => { let ptr = self.ref_to_mplace(self.read_immediate(args[0])?)?; - let expect_old = self.read_immediate(args[1])?; // read as value for the sake of `binary_op_val()` + let expect_old = self.read_immediate(args[1])?; // read as value for the sake of `binary_op_imm()` let new = self.read_scalar(args[2])?; - let old = self.read_immediate(ptr.into())?; // read as value for the sake of `binary_op_val()` - // binary_op_val will bail if either of them is not a scalar - let (eq, _) = self.binary_op_val(mir::BinOp::Eq, old, expect_old)?; + let old = self.read_immediate(ptr.into())?; // read as value for the sake of `binary_op_imm()` + // binary_op_imm will bail if either of them is not a scalar + let (eq, _) = self.binary_op_imm(mir::BinOp::Eq, old, expect_old)?; let res = Immediate::ScalarPair(old.to_scalar_or_undef(), eq.into()); self.write_immediate(res, dest)?; // old value is returned // update ptr depending on comparison @@ -234,7 +234,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, ' let a = self.read_immediate(args[0])?; let b = self.read_immediate(args[1])?; // check x % y != 0 - if self.binary_op_val(mir::BinOp::Rem, a, b)?.0.to_bytes()? != 0 { + if self.binary_op_imm(mir::BinOp::Rem, a, b)?.0.to_bytes()? != 0 { return err!(ValidationFailure(format!("exact_div: {:?} cannot be divided by {:?}", a, b))); } self.binop_ignore_overflow(mir::BinOp::Div, a, b, dest)?;