]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_ssa/mir/block.rs
moving some variants from InterpError to EvalErrorPanic
[rust.git] / src / librustc_codegen_ssa / mir / block.rs
index 941166ccfab091360e171d958544d269ecb9f8fc..beb6b9421ce338df6b8fef8bdbeb809334c6d182 100644 (file)
@@ -2,7 +2,7 @@
 use rustc::ty::{self, Ty, TypeFoldable, Instance};
 use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnTypeExt};
 use rustc::mir::{self, Place, PlaceBase, Static, StaticKind};
-use rustc::mir::interpret::InterpError;
+use rustc::mir::interpret::{InterpError, EvalErrorPanic};
 use rustc_target::abi::call::{ArgType, FnType, PassMode, IgnoreMode};
 use rustc_target::spec::abi::Abi;
 use crate::base;
@@ -368,7 +368,7 @@ fn codegen_assert_terminator<'b>(
         // checked operation, just a comparison with the minimum
         // value, so we have to check for the assert message.
         if !bx.check_overflow() {
-            if let mir::interpret::InterpError::OverflowNeg = *msg {
+            if let InterpError::Panic(EvalErrorPanic::OverflowNeg) = *msg {
                 const_cond = Some(expected);
             }
         }
@@ -403,7 +403,7 @@ fn codegen_assert_terminator<'b>(
 
         // Put together the arguments to the panic entry point.
         let (lang_item, args) = match *msg {
-            InterpError::BoundsCheck { ref len, ref index } => {
+            InterpError::Panic(EvalErrorPanic::BoundsCheck { ref len, ref index }) => {
                 let len = self.codegen_operand(&mut bx, len).immediate();
                 let index = self.codegen_operand(&mut bx, index).immediate();