diff options
| author | Tim (Theemathas) Chirananthavat <theemathas@gmail.com> | 2025-07-14 15:01:58 +0700 |
|---|---|---|
| committer | Tim (Theemathas) Chirananthavat <theemathas@gmail.com> | 2025-07-14 15:01:58 +0700 |
| commit | 6080c75d6293c3271c9f0b419e17e67fc57b7b02 (patch) | |
| tree | 3e22ec55d48ab3febd6c56520a89d8a5b064f86d /library/core/src/ptr/docs | |
| parent | ad635e5d0696076b4412dd7db7b7e8c0867d6e0c (diff) | |
Change "allocated object" to "allocation".
These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
Diffstat (limited to 'library/core/src/ptr/docs')
| -rw-r--r-- | library/core/src/ptr/docs/add.md | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/docs/offset.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ptr/docs/add.md b/library/core/src/ptr/docs/add.md index ae7c7785684..6e2e87f5f81 100644 --- a/library/core/src/ptr/docs/add.md +++ b/library/core/src/ptr/docs/add.md @@ -19,7 +19,7 @@ If any of the following conditions are violated, the result is Undefined Behavio bounds of that allocation. In particular, this range must not "wrap around" the edge of the address space. -Allocated objects can never be larger than `isize::MAX` bytes, so if the computed offset +Allocations can never be larger than `isize::MAX` bytes, so if the computed offset stays in bounds of the allocation, it is guaranteed to satisfy the first requirement. This implies, for instance, that `vec.as_ptr().add(vec.len())` (for `vec: Vec<T>`) is always safe. diff --git a/library/core/src/ptr/docs/offset.md b/library/core/src/ptr/docs/offset.md index f2e335a79a5..f04f5606ab2 100644 --- a/library/core/src/ptr/docs/offset.md +++ b/library/core/src/ptr/docs/offset.md @@ -16,7 +16,7 @@ bounds of that allocation. In particular, this range must not "wrap around" the of the address space. Note that "range" here refers to a half-open range as usual in Rust, i.e., `self..result` for non-negative offsets and `result..self` for negative offsets. -Allocated objects can never be larger than `isize::MAX` bytes, so if the computed offset +Allocations can never be larger than `isize::MAX` bytes, so if the computed offset stays in bounds of the allocation, it is guaranteed to satisfy the first requirement. This implies, for instance, that `vec.as_ptr().add(vec.len())` (for `vec: Vec<T>`) is always safe. |
