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;
}
/// Codegen implementations for some terminator variants.
-impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
+impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
/// Generates code for a `Resume` terminator.
fn codegen_resume_terminator<'b>(
&mut self,
// 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);
}
}
// 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();
return;
}
- // The "spoofed" `VaList` added to a C-variadic functions signature
+ // The "spoofed" `VaListImpl` added to a C-variadic functions signature
// should not be included in the `extra_args` calculation.
let extra_args_start_idx = sig.inputs().len() - if sig.c_variadic { 1 } else { 0 };
let extra_args = &args[extra_args_start_idx..];
(&args[..], None)
};
- // Useful determining if the current argument is the "spoofed" `VaList`
+ // Useful determining if the current argument is the "spoofed" `VaListImpl`
let last_arg_idx = if sig.inputs().is_empty() {
None
} else {
};
'make_args: for (i, arg) in first_args.iter().enumerate() {
// If this is a C-variadic function the function signature contains
- // an "spoofed" `VaList`. This argument is ignored, but we need to
+ // an "spoofed" `VaListImpl`. This argument is ignored, but we need to
// populate it with a dummy operand so that the users real arguments
// are not overwritten.
let i = if sig.c_variadic && last_arg_idx.map(|x| i >= x).unwrap_or(false) {
}
}
-impl<'a, 'tcx: 'a, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
+impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
pub fn codegen_block(
&mut self,
bb: mir::BasicBlock,