diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-06 12:13:55 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-06 15:19:31 +0100 |
| commit | 136ad015b6862274bf8c161dc5d2955409ed1465 (patch) | |
| tree | 44213c111b970f7f07b47611a2287e986a7f7a24 /src/libcore/ptr | |
| parent | 865b44a3e330f3ef8be0f6edf69896c9ed957ac0 (diff) | |
| download | rust-136ad015b6862274bf8c161dc5d2955409ed1465.tar.gz rust-136ad015b6862274bf8c161dc5d2955409ed1465.zip | |
fix various typos
Diffstat (limited to 'src/libcore/ptr')
| -rw-r--r-- | src/libcore/ptr/const_ptr.rs | 8 | ||||
| -rw-r--r-- | src/libcore/ptr/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/ptr/mut_ptr.rs | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs index fc3c02e1f06..a540016854d 100644 --- a/src/libcore/ptr/const_ptr.rs +++ b/src/libcore/ptr/const_ptr.rs @@ -53,7 +53,7 @@ impl<T: ?Sized> *const 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 @@ -183,7 +183,7 @@ impl<T: ?Sized> *const 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. @@ -480,7 +480,7 @@ impl<T: ?Sized> *const T { /// 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. @@ -535,7 +535,7 @@ impl<T: ?Sized> *const T { /// 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. diff --git a/src/libcore/ptr/mod.rs b/src/libcore/ptr/mod.rs index fcfa98d8507..72c46f58fcc 100644 --- a/src/libcore/ptr/mod.rs +++ b/src/libcore/ptr/mod.rs @@ -19,7 +19,7 @@ //! * All pointers (except for the null pointer) are valid for all operations of //! [size zero][zst]. //! * For a pointer to be valid, it is necessary, but not always sufficient, that the pointer -//! be *dereferencable*: the memory range of the given size starting at the pointer must all be +//! be *dereferenceable*: the memory range of the given size starting at the pointer must all be //! within the bounds of a single allocated object. Note that in Rust, //! every (stack-allocated) variable is considered a separate allocated object. //! * All accesses performed by functions in this module are *non-atomic* in the sense diff --git a/src/libcore/ptr/mut_ptr.rs b/src/libcore/ptr/mut_ptr.rs index 4bc0a3e9faa..01d830ca186 100644 --- a/src/libcore/ptr/mut_ptr.rs +++ b/src/libcore/ptr/mut_ptr.rs @@ -49,7 +49,7 @@ impl<T: ?Sized> *mut T { /// 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 @@ impl<T: ?Sized> *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 @@ impl<T: ?Sized> *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 @@ impl<T: ?Sized> *mut T { /// 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 @@ impl<T: ?Sized> *mut T { /// 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. |
