0,
),
};
- let len = b.to_usize(&ecx.tcx.tcx).unwrap();
+ let len = b.to_machine_usize(&ecx.tcx.tcx).unwrap();
let start = start.try_into().unwrap();
let len: usize = len.try_into().unwrap();
ConstValue::Slice {
args: &[OpTy<'tcx>],
dest: Option<PlaceTy<'tcx>>,
ret: Option<mir::BasicBlock>,
+ _unwind: Option<mir::BasicBlock> // unwinding is not supported in consts
) -> InterpResult<'tcx, Option<&'mir mir::Body<'tcx>>> {
debug!("eval_fn_call: {:?}", instance);
// Only check non-glue functions
span: Span,
instance: ty::Instance<'tcx>,
args: &[OpTy<'tcx>],
- dest: PlaceTy<'tcx>,
+ dest: Option<PlaceTy<'tcx>>,
) -> InterpResult<'tcx> {
if ecx.emulate_intrinsic(span, instance, args, dest)? {
return Ok(());
fn stack_push(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> {
Ok(())
}
-
- /// Called immediately before a stack frame gets popped.
- #[inline(always)]
- fn stack_pop(_ecx: &mut InterpCx<'mir, 'tcx, Self>, _extra: ()) -> InterpResult<'tcx> {
- Ok(())
- }
}
/// Extracts a field of a (variant of a) const.