Skip to content
Snippets Groups Projects
Commit 059c2578 authored by David Renshaw's avatar David Renshaw
Browse files

rustup: IntTy::Is -> IntTy::Isize, UintTy::Us -> UintTy::Usize

parent 83a63561
No related branches found
No related tags found
No related merge requests found
......@@ -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))),
}
......
......@@ -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)? {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment