@@ -482,28 +482,28 @@ impl<T: ?Sized> *const T {
482482 ///
483483 /// This operation itself is always safe, but using the resulting pointer is not.
484484 ///
485- /// The resulting pointer "remembers" the [allocated object ] that `self` points to
485+ /// The resulting pointer "remembers" the [allocation ] that `self` points to
486486 /// (this is called "[Provenance](ptr/index.html#provenance)").
487- /// The pointer must not be used to read or write other allocated objects .
487+ /// The pointer must not be used to read or write other allocations .
488488 ///
489489 /// In other words, `let z = x.wrapping_offset((y as isize) - (x as isize))` does *not* make `z`
490490 /// the same as `y` even if we assume `T` has size `1` and there is no overflow: `z` is still
491491 /// attached to the object `x` is attached to, and dereferencing it is Undefined Behavior unless
492- /// `x` and `y` point into the same allocated object .
492+ /// `x` and `y` point into the same allocation .
493493 ///
494494 /// Compared to [`offset`], this method basically delays the requirement of staying within the
495- /// same allocated object : [`offset`] is immediate Undefined Behavior when crossing object
495+ /// same allocation : [`offset`] is immediate Undefined Behavior when crossing object
496496 /// boundaries; `wrapping_offset` produces a pointer but still leads to Undefined Behavior if a
497497 /// pointer is dereferenced when it is out-of-bounds of the object it is attached to. [`offset`]
498498 /// can be optimized better and is thus preferable in performance-sensitive code.
499499 ///
500500 /// The delayed check only considers the value of the pointer that was dereferenced, not the
501501 /// intermediate values used during the computation of the final result. For example,
502502 /// `x.wrapping_offset(o).wrapping_offset(o.wrapping_neg())` is always the same as `x`. In other
503- /// words, leaving the allocated object and then re-entering it later is permitted.
503+ /// words, leaving the allocation and then re-entering it later is permitted.
504504 ///
505505 /// [`offset`]: #method.offset
506- /// [allocated object ]: crate::ptr#allocated-object
506+ /// [allocation ]: crate::ptr#allocation
507507 ///
508508 /// # Examples
509509 ///
@@ -616,18 +616,18 @@ impl<T: ?Sized> *const T {
616616 /// * `self` and `origin` must either
617617 ///
618618 /// * point to the same address, or
619- /// * both be [derived from][crate::ptr#provenance] a pointer to the same [allocated object ], and the memory range between
619+ /// * both be [derived from][crate::ptr#provenance] a pointer to the same [allocation ], and the memory range between
620620 /// the two pointers must be in bounds of that object. (See below for an example.)
621621 ///
622622 /// * The distance between the pointers, in bytes, must be an exact multiple
623623 /// of the size of `T`.
624624 ///
625625 /// As a consequence, the absolute distance between the pointers, in bytes, computed on
626626 /// mathematical integers (without "wrapping around"), cannot overflow an `isize`. This is
627- /// implied by the in-bounds requirement, and the fact that no allocated object can be larger
627+ /// implied by the in-bounds requirement, and the fact that no allocation can be larger
628628 /// than `isize::MAX` bytes.
629629 ///
630- /// The requirement for pointers to be derived from the same allocated object is primarily
630+ /// The requirement for pointers to be derived from the same allocation is primarily
631631 /// needed for `const`-compatibility: the distance between pointers into *different* allocated
632632 /// objects is not known at compile-time. However, the requirement also exists at
633633 /// runtime and may be exploited by optimizations. If you wish to compute the difference between
@@ -636,7 +636,7 @@ impl<T: ?Sized> *const T {
636636 // FIXME: recommend `addr()` instead of `as usize` once that is stable.
637637 ///
638638 /// [`add`]: #method.add
639- /// [allocated object ]: crate::ptr#allocated-object
639+ /// [allocation ]: crate::ptr#allocation
640640 ///
641641 /// # Panics
642642 ///
@@ -969,12 +969,12 @@ impl<T: ?Sized> *const T {
969969 /// "wrapping around"), must fit in an `isize`.
970970 ///
971971 /// * If the computed offset is non-zero, then `self` must be [derived from][crate::ptr#provenance] a pointer to some
972- /// [allocated object ], and the entire memory range between `self` and the result must be in
973- /// bounds of that allocated object . In particular, this range must not "wrap around" the edge
972+ /// [allocation ], and the entire memory range between `self` and the result must be in
973+ /// bounds of that allocation . In particular, this range must not "wrap around" the edge
974974 /// of the address space.
975975 ///
976- /// Allocated objects can never be larger than `isize::MAX` bytes, so if the computed offset
977- /// stays in bounds of the allocated object , it is guaranteed to satisfy the first requirement.
976+ /// Allocations can never be larger than `isize::MAX` bytes, so if the computed offset
977+ /// stays in bounds of the allocation , it is guaranteed to satisfy the first requirement.
978978 /// This implies, for instance, that `vec.as_ptr().add(vec.len())` (for `vec: Vec<T>`) is always
979979 /// safe.
980980 ///
@@ -983,7 +983,7 @@ impl<T: ?Sized> *const T {
983983 /// enables more aggressive compiler optimizations.
984984 ///
985985 /// [`wrapping_sub`]: #method.wrapping_sub
986- /// [allocated object ]: crate::ptr#allocated-object
986+ /// [allocation ]: crate::ptr#allocation
987987 ///
988988 /// # Examples
989989 ///
@@ -1073,27 +1073,27 @@ impl<T: ?Sized> *const T {
10731073 ///
10741074 /// This operation itself is always safe, but using the resulting pointer is not.
10751075 ///
1076- /// The resulting pointer "remembers" the [allocated object ] that `self` points to; it must not
1077- /// be used to read or write other allocated objects .
1076+ /// The resulting pointer "remembers" the [allocation ] that `self` points to; it must not
1077+ /// be used to read or write other allocations .
10781078 ///
10791079 /// In other words, `let z = x.wrapping_add((y as usize) - (x as usize))` does *not* make `z`
10801080 /// the same as `y` even if we assume `T` has size `1` and there is no overflow: `z` is still
10811081 /// attached to the object `x` is attached to, and dereferencing it is Undefined Behavior unless
1082- /// `x` and `y` point into the same allocated object .
1082+ /// `x` and `y` point into the same allocation .
10831083 ///
10841084 /// Compared to [`add`], this method basically delays the requirement of staying within the
1085- /// same allocated object : [`add`] is immediate Undefined Behavior when crossing object
1085+ /// same allocation : [`add`] is immediate Undefined Behavior when crossing object
10861086 /// boundaries; `wrapping_add` produces a pointer but still leads to Undefined Behavior if a
10871087 /// pointer is dereferenced when it is out-of-bounds of the object it is attached to. [`add`]
10881088 /// can be optimized better and is thus preferable in performance-sensitive code.
10891089 ///
10901090 /// The delayed check only considers the value of the pointer that was dereferenced, not the
10911091 /// intermediate values used during the computation of the final result. For example,
10921092 /// `x.wrapping_add(o).wrapping_sub(o)` is always the same as `x`. In other words, leaving the
1093- /// allocated object and then re-entering it later is permitted.
1093+ /// allocation and then re-entering it later is permitted.
10941094 ///
10951095 /// [`add`]: #method.add
1096- /// [allocated object ]: crate::ptr#allocated-object
1096+ /// [allocation ]: crate::ptr#allocation
10971097 ///
10981098 /// # Examples
10991099 ///
@@ -1152,27 +1152,27 @@ impl<T: ?Sized> *const T {
11521152 ///
11531153 /// This operation itself is always safe, but using the resulting pointer is not.
11541154 ///
1155- /// The resulting pointer "remembers" the [allocated object ] that `self` points to; it must not
1156- /// be used to read or write other allocated objects .
1155+ /// The resulting pointer "remembers" the [allocation ] that `self` points to; it must not
1156+ /// be used to read or write other allocations .
11571157 ///
11581158 /// In other words, `let z = x.wrapping_sub((x as usize) - (y as usize))` does *not* make `z`
11591159 /// the same as `y` even if we assume `T` has size `1` and there is no overflow: `z` is still
11601160 /// attached to the object `x` is attached to, and dereferencing it is Undefined Behavior unless
1161- /// `x` and `y` point into the same allocated object .
1161+ /// `x` and `y` point into the same allocation .
11621162 ///
11631163 /// Compared to [`sub`], this method basically delays the requirement of staying within the
1164- /// same allocated object : [`sub`] is immediate Undefined Behavior when crossing object
1164+ /// same allocation : [`sub`] is immediate Undefined Behavior when crossing object
11651165 /// boundaries; `wrapping_sub` produces a pointer but still leads to Undefined Behavior if a
11661166 /// pointer is dereferenced when it is out-of-bounds of the object it is attached to. [`sub`]
11671167 /// can be optimized better and is thus preferable in performance-sensitive code.
11681168 ///
11691169 /// The delayed check only considers the value of the pointer that was dereferenced, not the
11701170 /// intermediate values used during the computation of the final result. For example,
11711171 /// `x.wrapping_add(o).wrapping_sub(o)` is always the same as `x`. In other words, leaving the
1172- /// allocated object and then re-entering it later is permitted.
1172+ /// allocation and then re-entering it later is permitted.
11731173 ///
11741174 /// [`sub`]: #method.sub
1175- /// [allocated object ]: crate::ptr#allocated-object
1175+ /// [allocation ]: crate::ptr#allocation
11761176 ///
11771177 /// # Examples
11781178 ///
@@ -1564,8 +1564,8 @@ impl<T> *const [T] {
15641564 /// * The pointer must be [valid] for reads for `ptr.len() * size_of::<T>()` many bytes,
15651565 /// and it must be properly aligned. This means in particular:
15661566 ///
1567- /// * The entire memory range of this slice must be contained within a single [allocated object ]!
1568- /// Slices can never span across multiple allocated objects .
1567+ /// * The entire memory range of this slice must be contained within a single [allocation ]!
1568+ /// Slices can never span across multiple allocations .
15691569 ///
15701570 /// * The pointer must be aligned even for zero-length slices. One
15711571 /// reason for this is that enum layout optimizations may rely on references
@@ -1586,7 +1586,7 @@ impl<T> *const [T] {
15861586 /// See also [`slice::from_raw_parts`][].
15871587 ///
15881588 /// [valid]: crate::ptr#safety
1589- /// [allocated object ]: crate::ptr#allocated-object
1589+ /// [allocation ]: crate::ptr#allocation
15901590 ///
15911591 /// # Panics during const evaluation
15921592 ///
0 commit comments