diff --git a/src/cast.rs b/src/cast.rs index f01e8ac5261dde844015399ae1cac9f597c33bf0..ef147fcf8713e968491c4aa9702ebda6b379ff72 100644 --- a/src/cast.rs +++ b/src/cast.rs @@ -72,7 +72,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { IntTy::I32 => v as i32 as u128, IntTy::I64 => v as i64 as u128, IntTy::I128 => v as u128, - IntTy::Is => { + IntTy::Isize => { let ty = self.tcx.sess.target.isize_ty; self.int_to_int(v, ty) } @@ -85,7 +85,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { UintTy::U32 => v as u32 as u128, UintTy::U64 => v as u64 as u128, UintTy::U128 => v, - UintTy::Us => { + UintTy::Usize => { let ty = self.tcx.sess.target.usize_ty; self.int_to_uint(v, ty) } @@ -123,8 +123,8 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { match ty.sty { // Casting to a reference or fn pointer is not permitted by rustc, no need to support it here. TyRawPtr(_) | - TyInt(IntTy::Is) | - TyUint(UintTy::Us) => Ok(PrimVal::Ptr(ptr)), + TyInt(IntTy::Isize) | + TyUint(UintTy::Usize) => Ok(PrimVal::Ptr(ptr)), TyInt(_) | TyUint(_) => return Err(EvalError::ReadPointerAsBytes), _ => return Err(EvalError::Unimplemented(format!("ptr to {:?} cast", ty))), } diff --git a/src/eval_context.rs b/src/eval_context.rs index 7448021af2845084f35aedf9bf95c1e1ecd8f088..d470d2880c7e404836ede567ab4a0593b142ac8b 100644 --- a/src/eval_context.rs +++ b/src/eval_context.rs @@ -1133,7 +1133,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { I32 => 4, I64 => 8, I128 => 16, - Is => self.memory.pointer_size(), + Isize => self.memory.pointer_size(), }; PrimValKind::from_int_size(size) } @@ -1146,7 +1146,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { U32 => 4, U64 => 8, U128 => 16, - Us => self.memory.pointer_size(), + Usize => self.memory.pointer_size(), }; PrimValKind::from_uint_size(size) } @@ -1262,7 +1262,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { I32 => 4, I64 => 8, I128 => 16, - Is => self.memory.pointer_size(), + Isize => self.memory.pointer_size(), }; if !self.memory.points_to_concrete(ptr, size)? { @@ -1285,7 +1285,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { U32 => 4, U64 => 8, U128 => 16, - Us => self.memory.pointer_size(), + Usize => self.memory.pointer_size(), }; if !self.memory.points_to_concrete(ptr, size)? {