]> git.lizzy.rs Git - rust.git/commitdiff
Update to rustc nightly
authorOliver Scherer <github35764891676564198441@oli-obk.de>
Wed, 3 Apr 2019 08:48:11 +0000 (10:48 +0200)
committerOliver Scherer <github35764891676564198441@oli-obk.de>
Wed, 3 Apr 2019 08:48:11 +0000 (10:48 +0200)
rust-version
src/fn_call.rs
src/helpers.rs
src/operator.rs
src/stacked_borrows.rs
src/tls.rs

index eadee7c5f5de4af0507dae9eddedc39a62bb56f3..b621471218021633ab6e545caf89531b12fb1aed 100644 (file)
@@ -1 +1 @@
-nightly-2019-03-29
+nightly-2019-04-03
index 3c6384e1a79efb19bbbe8e5886834e074bd179e7..038f5ed8a047588dca0f12c262cd820a356bc364 100644 (file)
@@ -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)?;
 
index 2e4c955413ab7252f62c8b4fddd513e021272ec9..8a4cccc743e6f86f37d178898b850a8b612c1318 100644 (file)
@@ -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()
             })
     }
 
index 0cba240a7d0fe084fc1cc3c310731bd406374490..a30b11aeb27de6d37b383baa04f425ddd5e1400c 100644 (file)
@@ -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.
index c9ca1c84e0f70531fdacb9665b1d6ae0e0ee5a37..bea6aaf9cf892f54623c434402a63d83673c7b85 100644 (file)
@@ -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`.
index 796c2e5f9827ab861b62c67bdb64776ee05bc5b5..992e4fd05619045c4f55a52f17898580d6c8e528 100644 (file)
@@ -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)?;