diff options
| author | binarycat <binarycat@envs.net> | 2024-08-22 14:25:54 -0400 |
|---|---|---|
| committer | binarycat <binarycat@envs.net> | 2024-08-22 14:25:54 -0400 |
| commit | 988bc1c654a1319a7b6fb198184459d503b249be (patch) | |
| tree | becd54fe816b6fb4a7d49a16665a06037fb3d517 | |
| parent | 3877a7bcf3176740b49c94a137b233e88ce0a401 (diff) | |
| download | rust-988bc1c654a1319a7b6fb198184459d503b249be.tar.gz rust-988bc1c654a1319a7b6fb198184459d503b249be.zip | |
fix typos in new pointer conversion docs
| -rw-r--r-- | library/core/src/ptr/const_ptr.rs | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/mod.rs | 2 | ||||
| -rw-r--r-- | library/core/src/ptr/mut_ptr.rs | 8 | ||||
| -rw-r--r-- | library/core/src/ptr/non_null.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 8b9f7b57d00..d7eea937ef8 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -239,7 +239,7 @@ impl<T: ?Sized> *const T { /// # Safety /// /// When calling this method, you have to ensure that *either* the pointer is null *or* - /// the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion) + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). /// /// # Examples /// diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index b2fb365d227..a7d6602287b 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -87,7 +87,7 @@ //! even if they only modify `UnsafeCell` data. //! //! If a pointer follows all of these rules, it is said to be -//! *convertable to a reference*. +//! *convertible to a reference*. // ^ we use this term instead of saying that the produced reference must // be valid, as the validity of a reference is easily confused for the // validity of the thing it refers to, and while the two concepts are diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index fb393ffadd5..d7bb18590ed 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -247,7 +247,7 @@ impl<T: ?Sized> *mut T { /// # Safety /// /// When calling this method, you have to ensure that *either* the pointer is null *or* - /// the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion) + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion) /// /// # Examples /// @@ -296,7 +296,7 @@ impl<T: ?Sized> *mut T { /// /// # Safety /// - /// When calling this method, you have to ensure that the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion) + /// When calling this method, you have to ensure that the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion) /// /// # Examples /// @@ -330,7 +330,7 @@ impl<T: ?Sized> *mut T { /// # Safety /// /// When calling this method, you have to ensure that *either* the pointer is null *or* - /// the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion). + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). /// Note that because the created reference is to `MaybeUninit<T>`, the /// source pointer can point to uninitialized memory. /// @@ -566,7 +566,7 @@ impl<T: ?Sized> *mut T { /// /// When calling this method, you have to ensure that *either* /// the pointer is null *or* - /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion) + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). /// /// /// # Examples diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 1e1cf780c28..5d5d9d401a2 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -129,7 +129,7 @@ impl<T: Sized> NonNull<T> { /// # Safety /// /// When calling this method, you have to ensure that - /// the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion). + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). /// Note that because the created reference is to `MaybeUninit<T>`, the /// source pointer can point to uninitialized memory. #[inline] @@ -153,7 +153,7 @@ impl<T: Sized> NonNull<T> { /// # Safety /// /// When calling this method, you have to ensure that - /// the pointer is [convirtible to a reference](crate::ptr#pointer-to-reference-conversion). + /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). /// Note that because the created reference is to `MaybeUninit<T>`, the /// source pointer can point to uninitialized memory. #[inline] |
