From 059c25786ce0fb632bbcf752d171bee2a6c7f78c Mon Sep 17 00:00:00 2001 From: David Renshaw <dwrenshaw@gmail.com> Date: Sun, 7 Jan 2018 01:48:27 -0500 Subject: [PATCH] rustup: IntTy::Is -> IntTy::Isize, UintTy::Us -> UintTy::Usize --- src/cast.rs | 8 ++++---- src/eval_context.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cast.rs b/src/cast.rs index f01e8ac..ef147fc 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 7448021..d470d28 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)? { -- GitLab