Skip to content

Change "allocated object" to "allocation". #143917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ pub const unsafe fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
/// # Safety
///
/// - `index < PtrMetadata(slice_ptr)`, so the indexing is in-bounds for the slice
/// - the resulting offsetting is in-bounds of the allocated object, which is
/// - the resulting offsetting is in-bounds of the allocation, which is
/// always the case for references, but needs to be upheld manually for pointers
#[rustc_nounwind]
#[rustc_intrinsic]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/docs/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/docs/offset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading