about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-14 11:04:56 +0200
committerGitHub <noreply@github.com>2025-07-14 11:04:56 +0200
commitb5312fe567958e76a09da301b9aaa796b339abe3 (patch)
treef7be56b3e153823507e712fa199d29ebff2433be /library/core/src
parent37b5d79108e33ce8de64aaae3bd5924f19bec4cd (diff)
parent6080c75d6293c3271c9f0b419e17e67fc57b7b02 (diff)
downloadrust-b5312fe567958e76a09da301b9aaa796b339abe3.tar.gz
rust-b5312fe567958e76a09da301b9aaa796b339abe3.zip
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 <https://github.com/rust-lang/rust/pull/141224>
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/intrinsics/mod.rs2
-rw-r--r--library/core/src/ptr/docs/add.md2
-rw-r--r--library/core/src/ptr/docs/offset.md2
3 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/intrinsics/mod.rs b/library/core/src/intrinsics/mod.rs
index c2e4b751c65..1ece3d9bd5e 100644
--- a/library/core/src/intrinsics/mod.rs
+++ b/library/core/src/intrinsics/mod.rs
@@ -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]
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.