]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/ptr/mut_ptr.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / libcore / ptr / mut_ptr.rs
index 4bc0a3e9faa607dd93efe45742f92a040a3a5ecb..01d830ca186024aef22f5d81278469ab83bc3a63 100644 (file)
@@ -49,7 +49,7 @@ pub const fn cast<U>(self) -> *mut U {
     /// memory.
     ///
     /// When calling this method, you have to ensure that if the pointer is
-    /// non-NULL, then it is properly aligned, dereferencable (for the whole
+    /// non-NULL, then it is properly aligned, dereferenceable (for the whole
     /// size of `T`) and points to an initialized instance of `T`. This applies
     /// even if the result of this method is unused!
     /// (The part about being initialized is not yet fully decided, but until
@@ -176,7 +176,7 @@ pub unsafe fn offset(self, count: isize) -> *mut T
     /// within the same allocated object: [`offset`] is immediate Undefined Behavior when
     /// crossing object boundaries; `wrapping_offset` produces a pointer but still leads
     /// to Undefined Behavior if that pointer is dereferenced. [`offset`] can be optimized
-    /// better and is thus preferrable in performance-sensitive code.
+    /// better and is thus preferable in performance-sensitive code.
     ///
     /// If you need to cross object boundaries, cast the pointer to an integer and
     /// do the arithmetic there.
@@ -224,7 +224,7 @@ pub fn wrapping_offset(self, count: isize) -> *mut T
     /// all of the following is true:
     /// - it is properly aligned
     /// - it must point to an initialized instance of T; in particular, the pointer must be
-    ///   "dereferencable" in the sense defined [here].
+    ///   "dereferenceable" in the sense defined [here].
     ///
     /// This applies even if the result of this method is unused!
     /// (The part about being initialized is not yet fully decided, but until
@@ -526,7 +526,7 @@ pub unsafe fn sub(self, count: usize) -> Self
     /// within the same allocated object: [`add`] is immediate Undefined Behavior when
     /// crossing object boundaries; `wrapping_add` produces a pointer but still leads
     /// to Undefined Behavior if that pointer is dereferenced. [`add`] can be optimized
-    /// better and is thus preferrable in performance-sensitive code.
+    /// better and is thus preferable in performance-sensitive code.
     ///
     /// If you need to cross object boundaries, cast the pointer to an integer and
     /// do the arithmetic there.
@@ -581,7 +581,7 @@ pub fn wrapping_add(self, count: usize) -> Self
     /// within the same allocated object: [`sub`] is immediate Undefined Behavior when
     /// crossing object boundaries; `wrapping_sub` produces a pointer but still leads
     /// to Undefined Behavior if that pointer is dereferenced. [`sub`] can be optimized
-    /// better and is thus preferrable in performance-sensitive code.
+    /// better and is thus preferable in performance-sensitive code.
     ///
     /// If you need to cross object boundaries, cast the pointer to an integer and
     /// do the arithmetic there.