+
+ Rvalue::Cast(kind, ref operand, _) => {
+ let (value, ty, span) = self.eval_operand(operand, source_info)?;
+ self.use_ecx(source_info, |this| {
+ let dest_ptr = this.ecx.alloc_ptr(place_ty)?;
+ let place_align = this.ecx.layout_of(place_ty)?.align;
+ let dest = ::interpret::Place::from_ptr(dest_ptr, place_align);
+ this.ecx.cast(ValTy { value, ty }, kind, place_ty, dest)?;
+ Ok((
+ Value::ByRef(dest_ptr.into(), place_align),
+ place_ty,
+ span,
+ ))
+ })
+ }
+