Rollup merge of #55844 - waywardmonkeys:typo-fixes, r=varkor
Fix documentation typos.
This commit is contained in:
commit
17ae50765e
@ -523,7 +523,7 @@ unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
|
|||||||
ptr
|
ptr
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shink or grow a block of memory to the given `new_size`.
|
/// Shrink or grow a block of memory to the given `new_size`.
|
||||||
/// The block is described by the given `ptr` pointer and `layout`.
|
/// The block is described by the given `ptr` pointer and `layout`.
|
||||||
///
|
///
|
||||||
/// If this returns a non-null pointer, then ownership of the memory block
|
/// If this returns a non-null pointer, then ownership of the memory block
|
||||||
@ -774,7 +774,7 @@ fn usable_size(&self, layout: &Layout) -> (usize, usize) {
|
|||||||
// realloc. alloc_excess, realloc_excess
|
// realloc. alloc_excess, realloc_excess
|
||||||
|
|
||||||
/// Returns a pointer suitable for holding data described by
|
/// Returns a pointer suitable for holding data described by
|
||||||
/// a new layout with `layout`’s alginment and a size given
|
/// a new layout with `layout`’s alignment and a size given
|
||||||
/// by `new_size`. To
|
/// by `new_size`. To
|
||||||
/// accomplish this, this may extend or shrink the allocation
|
/// accomplish this, this may extend or shrink the allocation
|
||||||
/// referenced by `ptr` to fit the new layout.
|
/// referenced by `ptr` to fit the new layout.
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
use pin::Pin;
|
use pin::Pin;
|
||||||
use task::{Poll, LocalWaker};
|
use task::{Poll, LocalWaker};
|
||||||
|
|
||||||
/// A future represents an asychronous computation.
|
/// A future represents an asynchronous computation.
|
||||||
///
|
///
|
||||||
/// A future is a value that may not have finished computing yet. This kind of
|
/// A future is a value that may not have finished computing yet. This kind of
|
||||||
/// "asynchronous value" makes it possible for a thread to continue doing useful
|
/// "asynchronous value" makes it possible for a thread to continue doing useful
|
||||||
|
@ -228,7 +228,7 @@
|
|||||||
mod tuple;
|
mod tuple;
|
||||||
mod unit;
|
mod unit;
|
||||||
|
|
||||||
// Pull in the the `coresimd` crate directly into libcore. This is where all the
|
// Pull in the `coresimd` crate directly into libcore. This is where all the
|
||||||
// architecture-specific (and vendor-specific) intrinsics are defined. AKA
|
// architecture-specific (and vendor-specific) intrinsics are defined. AKA
|
||||||
// things like SIMD and such. Note that the actual source for all this lies in a
|
// things like SIMD and such. Note that the actual source for all this lies in a
|
||||||
// different repository, rust-lang-nursery/stdsimd. That's why the setup here is
|
// different repository, rust-lang-nursery/stdsimd. That's why the setup here is
|
||||||
|
@ -202,7 +202,7 @@ pub fn forget<T>(t: T) {
|
|||||||
///
|
///
|
||||||
/// ## Size of Enums
|
/// ## Size of Enums
|
||||||
///
|
///
|
||||||
/// Enums that carry no data other than the descriminant have the same size as C enums
|
/// Enums that carry no data other than the discriminant have the same size as C enums
|
||||||
/// on the platform they are compiled for.
|
/// on the platform they are compiled for.
|
||||||
///
|
///
|
||||||
/// ## Size of Unions
|
/// ## Size of Unions
|
||||||
@ -1081,7 +1081,7 @@ pub fn set(&mut self, val: T) {
|
|||||||
///
|
///
|
||||||
/// # Unsafety
|
/// # Unsafety
|
||||||
///
|
///
|
||||||
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
|
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
|
||||||
/// state, otherwise this will immediately cause undefined behavior.
|
/// state, otherwise this will immediately cause undefined behavior.
|
||||||
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
||||||
pub unsafe fn into_inner(self) -> T {
|
pub unsafe fn into_inner(self) -> T {
|
||||||
@ -1092,7 +1092,7 @@ pub unsafe fn into_inner(self) -> T {
|
|||||||
///
|
///
|
||||||
/// # Unsafety
|
/// # Unsafety
|
||||||
///
|
///
|
||||||
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
|
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
|
||||||
/// state, otherwise this will immediately cause undefined behavior.
|
/// state, otherwise this will immediately cause undefined behavior.
|
||||||
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
||||||
pub unsafe fn get_ref(&self) -> &T {
|
pub unsafe fn get_ref(&self) -> &T {
|
||||||
@ -1103,7 +1103,7 @@ pub unsafe fn get_ref(&self) -> &T {
|
|||||||
///
|
///
|
||||||
/// # Unsafety
|
/// # Unsafety
|
||||||
///
|
///
|
||||||
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
|
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
|
||||||
/// state, otherwise this will immediately cause undefined behavior.
|
/// state, otherwise this will immediately cause undefined behavior.
|
||||||
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
||||||
pub unsafe fn get_mut(&mut self) -> &mut T {
|
pub unsafe fn get_mut(&mut self) -> &mut T {
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
///
|
///
|
||||||
/// Additionally, if `T` is not [`Copy`], using the pointed-to value after
|
/// Additionally, if `T` is not [`Copy`], using the pointed-to value after
|
||||||
/// calling `drop_in_place` can cause undefined behavior. Note that `*to_drop =
|
/// calling `drop_in_place` can cause undefined behavior. Note that `*to_drop =
|
||||||
/// foo` counts as a use because it will cause the the value to be dropped
|
/// foo` counts as a use because it will cause the value to be dropped
|
||||||
/// again. [`write`] can be used to overwrite data without causing it to be
|
/// again. [`write`] can be used to overwrite data without causing it to be
|
||||||
/// dropped.
|
/// dropped.
|
||||||
///
|
///
|
||||||
@ -371,7 +371,7 @@ pub(crate) unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
|
|||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
|
unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
|
||||||
// The approach here is to utilize simd to swap x & y efficiently. Testing reveals
|
// The approach here is to utilize simd to swap x & y efficiently. Testing reveals
|
||||||
// that swapping either 32 bytes or 64 bytes at a time is most efficient for intel
|
// that swapping either 32 bytes or 64 bytes at a time is most efficient for Intel
|
||||||
// Haswell E processors. LLVM is more able to optimize if we give a struct a
|
// Haswell E processors. LLVM is more able to optimize if we give a struct a
|
||||||
// #[repr(simd)], even if we don't actually use this struct directly.
|
// #[repr(simd)], even if we don't actually use this struct directly.
|
||||||
//
|
//
|
||||||
@ -1005,7 +1005,7 @@ pub fn is_null(self) -> bool {
|
|||||||
/// # Null-unchecked version
|
/// # Null-unchecked version
|
||||||
///
|
///
|
||||||
/// If you are sure the pointer can never be null and are looking for some kind of
|
/// If you are sure the pointer can never be null and are looking for some kind of
|
||||||
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>, know that you can
|
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>`, know that you can
|
||||||
/// dereference the pointer directly.
|
/// dereference the pointer directly.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
@ -1625,7 +1625,7 @@ pub fn is_null(self) -> bool {
|
|||||||
/// # Null-unchecked version
|
/// # Null-unchecked version
|
||||||
///
|
///
|
||||||
/// If you are sure the pointer can never be null and are looking for some kind of
|
/// If you are sure the pointer can never be null and are looking for some kind of
|
||||||
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>, know that you can
|
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>`, know that you can
|
||||||
/// dereference the pointer directly.
|
/// dereference the pointer directly.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -1178,7 +1178,7 @@ pub fn to_str(&self) -> Result<&str, str::Utf8Error> {
|
|||||||
///
|
///
|
||||||
/// If the contents of the `CStr` are valid UTF-8 data, this
|
/// If the contents of the `CStr` are valid UTF-8 data, this
|
||||||
/// function will return a [`Cow`]`::`[`Borrowed`]`(`[`&str`]`)`
|
/// function will return a [`Cow`]`::`[`Borrowed`]`(`[`&str`]`)`
|
||||||
/// with the the corresponding [`&str`] slice. Otherwise, it will
|
/// with the corresponding [`&str`] slice. Otherwise, it will
|
||||||
/// replace any invalid UTF-8 sequences with
|
/// replace any invalid UTF-8 sequences with
|
||||||
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a
|
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a
|
||||||
/// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result.
|
/// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result.
|
||||||
|
@ -495,7 +495,7 @@ pub mod task {
|
|||||||
// compiler
|
// compiler
|
||||||
pub mod rt;
|
pub mod rt;
|
||||||
|
|
||||||
// Pull in the the `stdsimd` crate directly into libstd. This is the same as
|
// Pull in the `stdsimd` crate directly into libstd. This is the same as
|
||||||
// libcore's arch/simd modules where the source of truth here is in a different
|
// libcore's arch/simd modules where the source of truth here is in a different
|
||||||
// repository, but we pull things in here manually to get it into libstd.
|
// repository, but we pull things in here manually to get it into libstd.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user