From 935f9c1ba53fb3fa704cce402a9e9fb207d8ed21 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Mon, 15 Apr 2019 12:42:21 +0200 Subject: [PATCH] Clarify maximum pointer offset --- reference/src/layout/scalars.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/src/layout/scalars.md b/reference/src/layout/scalars.md index 17736de8..073e9f24 100644 --- a/reference/src/layout/scalars.md +++ b/reference/src/layout/scalars.md @@ -53,8 +53,8 @@ They have the same layout as the [pointer types] for which the pointee is > usize]`. Only ZST arrays can probably be this large in practice, non-ZST > arrays are bound by the maximum size of Rust values, > -> * the maximum value by which a pointer can be offseted using `ptr.add(count: -> usize)` is `usize::max_value()`. +> * the maximum value in bytes by which a pointer can be offseted using +> `ptr.add` or `ptr.offset` is `isize::max_value()`. > > These limits have not gone through the RFC process and are not guaranteed to > hold.