mirror of
https://github.com/rust-lang/rust
synced 2024-10-01 22:34:35 +00:00
fix typos in new pointer conversion docs
This commit is contained in:
parent
3877a7bcf3
commit
988bc1c654
|
@ -239,7 +239,7 @@ pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata)
|
|||
/// # 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
|
||||
///
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -247,7 +247,7 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
|
|||
/// # 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 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
|
|||
///
|
||||
/// # 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 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
|
|||
/// # 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 @@ pub fn mask(self, mask: usize) -> *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
|
||||
|
|
|
@ -129,7 +129,7 @@ pub const fn dangling() -> Self {
|
|||
/// # 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 @@ pub const fn dangling() -> Self {
|
|||
/// # 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]
|
||||
|
|
Loading…
Reference in a new issue