From 9a0eaf6ebd6165a071ce3cf6d30921e02a115660 Mon Sep 17 00:00:00 2001 From: Oliver Scherer Date: Wed, 3 Apr 2019 10:48:11 +0200 Subject: [PATCH] Update to rustc nightly --- rust-version | 2 +- src/fn_call.rs | 4 ++-- src/helpers.rs | 2 +- src/operator.rs | 2 +- src/stacked_borrows.rs | 6 +++--- src/tls.rs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rust-version b/rust-version index eadee7c5f5d..b6214712180 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -nightly-2019-03-29 +nightly-2019-04-03 diff --git a/src/fn_call.rs b/src/fn_call.rs index 3c6384e1a79..038f5ed8a04 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -270,7 +270,7 @@ fn emulate_foreign_item( let mut args = this.frame().mir.args_iter(); let arg_local = args.next().ok_or_else(|| - EvalErrorKind::AbiViolation( + InterpError::AbiViolation( "Argument to __rust_maybe_catch_panic does not take enough arguments." .to_owned(), ), @@ -529,7 +529,7 @@ fn emulate_foreign_item( // This is `libc::pthread_key_t`. let key_type = args[0].layout.ty .builtin_deref(true) - .ok_or_else(|| EvalErrorKind::AbiViolation("wrong signature used for `pthread_key_create`: first argument must be a raw pointer.".to_owned()))? + .ok_or_else(|| InterpError::AbiViolation("wrong signature used for `pthread_key_create`: first argument must be a raw pointer.".to_owned()))? .ty; let key_layout = this.layout_of(key_type)?; diff --git a/src/helpers.rs b/src/helpers.rs index 2e4c955413a..8a4cccc743e 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -39,7 +39,7 @@ fn resolve_path(&self, path: &[&str]) -> EvalResult<'tcx, ty::Instance<'tcx>> { }) .ok_or_else(|| { let path = path.iter().map(|&s| s.to_owned()).collect(); - EvalErrorKind::PathNotFound(path).into() + InterpError::PathNotFound(path).into() }) } diff --git a/src/operator.rs b/src/operator.rs index 0cba240a7d0..a30b11aeb27 100644 --- a/src/operator.rs +++ b/src/operator.rs @@ -325,7 +325,7 @@ fn pointer_offset_inbounds( let pointee_size = self.layout_of(pointee_ty)?.size.bytes() as i64; let offset = offset .checked_mul(pointee_size) - .ok_or_else(|| EvalErrorKind::Overflow(mir::BinOp::Mul))?; + .ok_or_else(|| InterpError::Overflow(mir::BinOp::Mul))?; // Now let's see what kind of pointer this is. if let Scalar::Ptr(ptr) = ptr { // Both old and new pointer must be in-bounds of a *live* allocation. diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index c9ca1c84e0f..bea6aaf9cf8 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -7,7 +7,7 @@ use rustc::mir::RetagKind; use crate::{ - EvalResult, EvalErrorKind, MiriEvalContext, HelpersEvalContextExt, Evaluator, MutValueVisitor, + EvalResult, InterpError, MiriEvalContext, HelpersEvalContextExt, Evaluator, MutValueVisitor, MemoryKind, MiriMemoryKind, RangeMap, AllocId, Allocation, AllocationExtra, Pointer, Immediate, ImmTy, PlaceTy, MPlaceTy, }; @@ -380,7 +380,7 @@ fn deref( ptr.tag, kind, ptr, size.bytes()); let stacks = self.stacks.borrow(); for stack in stacks.iter(ptr.offset, size) { - stack.deref(ptr.tag, kind).map_err(EvalErrorKind::MachineError)?; + stack.deref(ptr.tag, kind).map_err(InterpError::MachineError)?; } Ok(()) } @@ -435,7 +435,7 @@ fn reborrow( let mut stacks = self.stacks.borrow_mut(); for stack in stacks.iter_mut(ptr.offset, size) { // Access source `ptr`, create new ref. - let ptr_idx = stack.deref(ptr.tag, new_kind).map_err(EvalErrorKind::MachineError)?; + let ptr_idx = stack.deref(ptr.tag, new_kind).map_err(InterpError::MachineError)?; // If we can deref the new tag already, and if that tag lives higher on // the stack than the one we come from, just use that. // That is, we check if `new_bor` *already* is "derived from" `ptr.tag`. diff --git a/src/tls.rs b/src/tls.rs index 796c2e5f982..992e4fd0561 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -4,7 +4,7 @@ use rustc::{ty, ty::layout::HasDataLayout, mir}; use crate::{ - EvalResult, EvalErrorKind, StackPopCleanup, + EvalResult, InterpError, StackPopCleanup, MPlaceTy, Scalar, Borrow, }; @@ -149,7 +149,7 @@ fn run_tls_dtors(&mut self) -> EvalResult<'tcx> { StackPopCleanup::None { cleanup: true }, )?; let arg_local = this.frame().mir.args_iter().next().ok_or_else( - || EvalErrorKind::AbiViolation("TLS dtor does not take enough arguments.".to_owned()), + || InterpError::AbiViolation("TLS dtor does not take enough arguments.".to_owned()), )?; let dest = this.eval_place(&mir::Place::Base(mir::PlaceBase::Local(arg_local)))?; this.write_scalar(ptr, dest)?; -- 2.44.0