Skip to content

Commit b5312fe

Browse files
authored
Rollup merge of #143917 - theemathas:change-allocated-object-to-allocation, r=oli-obk
Change "allocated object" to "allocation". These seem like they were missed in <#141224>
2 parents 37b5d79 + 6080c75 commit b5312fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ pub const unsafe fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
910910
/// # Safety
911911
///
912912
/// - `index < PtrMetadata(slice_ptr)`, so the indexing is in-bounds for the slice
913-
/// - the resulting offsetting is in-bounds of the allocated object, which is
913+
/// - the resulting offsetting is in-bounds of the allocation, which is
914914
/// always the case for references, but needs to be upheld manually for pointers
915915
#[rustc_nounwind]
916916
#[rustc_intrinsic]

library/core/src/ptr/docs/add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If any of the following conditions are violated, the result is Undefined Behavio
1919
bounds of that allocation. In particular, this range must not "wrap around" the edge
2020
of the address space.
2121

22-
Allocated objects can never be larger than `isize::MAX` bytes, so if the computed offset
22+
Allocations can never be larger than `isize::MAX` bytes, so if the computed offset
2323
stays in bounds of the allocation, it is guaranteed to satisfy the first requirement.
2424
This implies, for instance, that `vec.as_ptr().add(vec.len())` (for `vec: Vec<T>`) is always
2525
safe.

library/core/src/ptr/docs/offset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bounds of that allocation. In particular, this range must not "wrap around" the
1616
of the address space. Note that "range" here refers to a half-open range as usual in Rust,
1717
i.e., `self..result` for non-negative offsets and `result..self` for negative offsets.
1818

19-
Allocated objects can never be larger than `isize::MAX` bytes, so if the computed offset
19+
Allocations can never be larger than `isize::MAX` bytes, so if the computed offset
2020
stays in bounds of the allocation, it is guaranteed to satisfy the first requirement.
2121
This implies, for instance, that `vec.as_ptr().add(vec.len())` (for `vec: Vec<T>`) is always
2222
safe.

0 commit comments

Comments
 (0)