Skip to content

Commit 17ae507

Browse files
authored
Rollup merge of #55844 - waywardmonkeys:typo-fixes, r=varkor
Fix documentation typos.
2 parents 417b10a + 9b4d68e commit 17ae507

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/libcore/alloc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ pub unsafe trait GlobalAlloc {
523523
ptr
524524
}
525525

526-
/// Shink or grow a block of memory to the given `new_size`.
526+
/// Shrink or grow a block of memory to the given `new_size`.
527527
/// The block is described by the given `ptr` pointer and `layout`.
528528
///
529529
/// If this returns a non-null pointer, then ownership of the memory block
@@ -774,7 +774,7 @@ pub unsafe trait Alloc {
774774
// realloc. alloc_excess, realloc_excess
775775

776776
/// Returns a pointer suitable for holding data described by
777-
/// a new layout with `layout`’s alginment and a size given
777+
/// a new layout with `layout`’s alignment and a size given
778778
/// by `new_size`. To
779779
/// accomplish this, this may extend or shrink the allocation
780780
/// referenced by `ptr` to fit the new layout.

src/libcore/future/future.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use ops;
1717
use pin::Pin;
1818
use task::{Poll, LocalWaker};
1919

20-
/// A future represents an asychronous computation.
20+
/// A future represents an asynchronous computation.
2121
///
2222
/// A future is a value that may not have finished computing yet. This kind of
2323
/// "asynchronous value" makes it possible for a thread to continue doing useful

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ mod nonzero;
228228
mod tuple;
229229
mod unit;
230230

231-
// Pull in the the `coresimd` crate directly into libcore. This is where all the
231+
// Pull in the `coresimd` crate directly into libcore. This is where all the
232232
// architecture-specific (and vendor-specific) intrinsics are defined. AKA
233233
// things like SIMD and such. Note that the actual source for all this lies in a
234234
// different repository, rust-lang-nursery/stdsimd. That's why the setup here is

src/libcore/mem.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub fn forget<T>(t: T) {
202202
///
203203
/// ## Size of Enums
204204
///
205-
/// Enums that carry no data other than the descriminant have the same size as C enums
205+
/// Enums that carry no data other than the discriminant have the same size as C enums
206206
/// on the platform they are compiled for.
207207
///
208208
/// ## Size of Unions
@@ -1081,7 +1081,7 @@ impl<T> MaybeUninit<T> {
10811081
///
10821082
/// # Unsafety
10831083
///
1084-
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
1084+
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
10851085
/// state, otherwise this will immediately cause undefined behavior.
10861086
#[unstable(feature = "maybe_uninit", issue = "53491")]
10871087
pub unsafe fn into_inner(self) -> T {
@@ -1092,7 +1092,7 @@ impl<T> MaybeUninit<T> {
10921092
///
10931093
/// # Unsafety
10941094
///
1095-
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
1095+
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
10961096
/// state, otherwise this will immediately cause undefined behavior.
10971097
#[unstable(feature = "maybe_uninit", issue = "53491")]
10981098
pub unsafe fn get_ref(&self) -> &T {
@@ -1103,7 +1103,7 @@ impl<T> MaybeUninit<T> {
11031103
///
11041104
/// # Unsafety
11051105
///
1106-
/// It is up to the caller to guarantee that the the `MaybeUninit` really is in an initialized
1106+
/// It is up to the caller to guarantee that the `MaybeUninit` really is in an initialized
11071107
/// state, otherwise this will immediately cause undefined behavior.
11081108
#[unstable(feature = "maybe_uninit", issue = "53491")]
11091109
pub unsafe fn get_mut(&mut self) -> &mut T {

src/libcore/ptr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub use intrinsics::write_bytes;
120120
///
121121
/// Additionally, if `T` is not [`Copy`], using the pointed-to value after
122122
/// calling `drop_in_place` can cause undefined behavior. Note that `*to_drop =
123-
/// foo` counts as a use because it will cause the the value to be dropped
123+
/// foo` counts as a use because it will cause the value to be dropped
124124
/// again. [`write`] can be used to overwrite data without causing it to be
125125
/// dropped.
126126
///
@@ -371,7 +371,7 @@ pub(crate) unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
371371
#[inline]
372372
unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
373373
// The approach here is to utilize simd to swap x & y efficiently. Testing reveals
374-
// that swapping either 32 bytes or 64 bytes at a time is most efficient for intel
374+
// that swapping either 32 bytes or 64 bytes at a time is most efficient for Intel
375375
// Haswell E processors. LLVM is more able to optimize if we give a struct a
376376
// #[repr(simd)], even if we don't actually use this struct directly.
377377
//
@@ -1005,7 +1005,7 @@ impl<T: ?Sized> *const T {
10051005
/// # Null-unchecked version
10061006
///
10071007
/// If you are sure the pointer can never be null and are looking for some kind of
1008-
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>, know that you can
1008+
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>`, know that you can
10091009
/// dereference the pointer directly.
10101010
///
10111011
/// ```
@@ -1625,7 +1625,7 @@ impl<T: ?Sized> *mut T {
16251625
/// # Null-unchecked version
16261626
///
16271627
/// If you are sure the pointer can never be null and are looking for some kind of
1628-
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>, know that you can
1628+
/// `as_ref_unchecked` that returns the `&T` instead of `Option<&T>`, know that you can
16291629
/// dereference the pointer directly.
16301630
///
16311631
/// ```

src/libstd/ffi/c_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ impl CStr {
11781178
///
11791179
/// If the contents of the `CStr` are valid UTF-8 data, this
11801180
/// function will return a [`Cow`]`::`[`Borrowed`]`(`[`&str`]`)`
1181-
/// with the the corresponding [`&str`] slice. Otherwise, it will
1181+
/// with the corresponding [`&str`] slice. Otherwise, it will
11821182
/// replace any invalid UTF-8 sequences with
11831183
/// [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD] and return a
11841184
/// [`Cow`]`::`[`Owned`]`(`[`String`]`)` with the result.

src/libstd/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ mod memchr;
495495
// compiler
496496
pub mod rt;
497497

498-
// Pull in the the `stdsimd` crate directly into libstd. This is the same as
498+
// Pull in the `stdsimd` crate directly into libstd. This is the same as
499499
// libcore's arch/simd modules where the source of truth here is in a different
500500
// repository, but we pull things in here manually to get it into libstd.
501501
//

0 commit comments

Comments
 (0)