提交 bc9435d2 编写于 作者: R Ralf Jung

tidy up

上级 9a9dbfff
......@@ -313,7 +313,12 @@ pub fn check_bounds_ptr(&self, ptr: Pointer<M::PointerTag>, access: bool) -> Eva
/// Check if the memory range beginning at `ptr` and of size `Size` is "in-bounds".
#[inline(always)]
pub fn check_bounds(&self, ptr: Pointer<M::PointerTag>, size: Size, access: bool) -> EvalResult<'tcx> {
pub fn check_bounds(
&self,
ptr: Pointer<M::PointerTag>,
size: Size,
access: bool
) -> EvalResult<'tcx> {
// if ptr.offset is in bounds, then so is ptr (because offset checks for overflow)
self.check_bounds_ptr(ptr.offset(size, &*self)?, access)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册