fix typos in new pointer conversion docs

This commit is contained in:
binarycat 2024-08-22 14:25:54 -04:00
parent 3877a7bcf3
commit 988bc1c654
4 changed files with 8 additions and 8 deletions

View file

@ -239,7 +239,7 @@ pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata)
/// # Safety /// # Safety
/// ///
/// When calling this method, you have to ensure that *either* the pointer is null *or* /// 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 /// # Examples
/// ///

View file

@ -87,7 +87,7 @@
//! even if they only modify `UnsafeCell` data. //! even if they only modify `UnsafeCell` data.
//! //!
//! If a pointer follows all of these rules, it is said to be //! 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 // ^ 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 // 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 // validity of the thing it refers to, and while the two concepts are

View file

@ -247,7 +247,7 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// # Safety /// # Safety
/// ///
/// When calling this method, you have to ensure that *either* the pointer is null *or* /// 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 /// # Examples
/// ///
@ -296,7 +296,7 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// ///
/// # Safety /// # 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 /// # Examples
/// ///
@ -330,7 +330,7 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// # Safety /// # Safety
/// ///
/// When calling this method, you have to ensure that *either* the pointer is null *or* /// 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 /// Note that because the created reference is to `MaybeUninit<T>`, the
/// source pointer can point to uninitialized memory. /// source pointer can point to uninitialized memory.
/// ///
@ -566,7 +566,7 @@ pub fn mask(self, mask: usize) -> *mut T {
/// ///
/// When calling this method, you have to ensure that *either* /// When calling this method, you have to ensure that *either*
/// the pointer is null *or* /// 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 /// # Examples

View file

@ -129,7 +129,7 @@ pub const fn dangling() -> Self {
/// # Safety /// # Safety
/// ///
/// When calling this method, you have to ensure that /// 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 /// Note that because the created reference is to `MaybeUninit<T>`, the
/// source pointer can point to uninitialized memory. /// source pointer can point to uninitialized memory.
#[inline] #[inline]
@ -153,7 +153,7 @@ pub const fn dangling() -> Self {
/// # Safety /// # Safety
/// ///
/// When calling this method, you have to ensure that /// 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 /// Note that because the created reference is to `MaybeUninit<T>`, the
/// source pointer can point to uninitialized memory. /// source pointer can point to uninitialized memory.
#[inline] #[inline]