Skip to content

Commit

Permalink
fix typos in new pointer conversion docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lolbinarycat committed Aug 22, 2024
1 parent f26f981 commit eae7987
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
2 changes: 1 addition & 1 deletion core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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
///
Expand Down Expand Up @@ -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.
///
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down

0 comments on commit eae7987

Please sign in to comment.