diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index a0d04bd59321..5c83fb8c821f 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -30,7 +30,7 @@ use crate::interpret::{ self, InterpCx, ScalarMaybeUndef, Immediate, OpTy, StackPopCleanup, LocalValue, LocalState, AllocId, Frame, Allocation, MemoryKind, ImmTy, Pointer, Memory, PlaceTy, - Operand as InterpOperand, + StackPopInfo, Operand as InterpOperand, }; use crate::const_eval::error_to_const_error; use crate::transform::{MirPass, MirSource}; @@ -143,6 +143,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine { _args: &[OpTy<'tcx>], _dest: Option>, _ret: Option, + _unwind: Option, ) -> InterpResult<'tcx, Option<&'mir Body<'tcx>>> { Ok(None) } @@ -162,7 +163,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine { _span: Span, _instance: ty::Instance<'tcx>, _args: &[OpTy<'tcx>], - _dest: PlaceTy<'tcx>, + _dest: Option>, ) -> InterpResult<'tcx> { throw_unsup_format!("calling intrinsics isn't supported in ConstProp"); } @@ -254,8 +255,11 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine { /// Called immediately before a stack frame gets popped. #[inline(always)] - fn stack_pop(_ecx: &mut InterpCx<'mir, 'tcx, Self>, _extra: ()) -> InterpResult<'tcx> { - Ok(()) + fn stack_pop( + _ecx: &mut InterpCx<'mir, 'tcx, Self>, + _extra: () + ) -> InterpResult<'tcx, StackPopInfo> { + Ok(StackPopInfo::Normal) } }