about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-11-11 00:21:25 +0100
committerGitHub <noreply@github.com>2018-11-11 00:21:25 +0100
commit17ae50765ea73e2cd05c152f235f3e41efa5f518 (patch)
tree53e2d491158e0b4b39d7f5395feb5f1c8c39d690 /src/libcore
parent417b10a0e3dd1ee8f677007763f830f34d320644 (diff)
parent9b4d68e53bd0eaa1ef3e402d0227f2d9ef1970dd (diff)
downloadrust-17ae50765ea73e2cd05c152f235f3e41efa5f518.tar.gz
rust-17ae50765ea73e2cd05c152f235f3e41efa5f518.zip
Rollup merge of #55844 - waywardmonkeys:typo-fixes, r=varkor
Fix documentation typos.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/alloc.rs4
-rw-r--r--src/libcore/future/future.rs2
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/mem.rs8
-rw-r--r--src/libcore/ptr.rs8
5 files changed, 12 insertions, 12 deletions
diff --git a/src/libcore/alloc.rs b/src/libcore/alloc.rs
index dd3e8da18a9..58639808fae 100644
--- a/src/libcore/alloc.rs
+++ b/src/libcore/alloc.rs
@@ -523,7 +523,7 @@ pub unsafe trait GlobalAlloc {
         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`.
     ///
     /// If this returns a non-null pointer, then ownership of the memory block
@@ -774,7 +774,7 @@ pub unsafe trait Alloc {
     // realloc. alloc_excess, realloc_excess
 
     /// 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
     /// accomplish this, this may extend or shrink the allocation
     /// referenced by `ptr` to fit the new layout.
diff --git a/src/libcore/future/future.rs b/src/libcore/future/future.rs
index 9176e0d32cb..0c870f9e404 100644
--- a/src/libcore/future/future.rs
+++ b/src/libcore/future/future.rs
@@ -17,7 +17,7 @@ use ops;
 use pin::Pin;
 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
 /// "asynchronous value" makes it possible for a thread to continue doing useful
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 1bbc7892c6b..c69d4441121 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -228,7 +228,7 @@ mod nonzero;
 mod tuple;
 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
 // 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
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 1d0b194487e..8c4ff02aa14 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -202,7 +202,7 @@ pub fn forget<T>(t: T) {
 ///
 /// ## 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.
 ///
 /// ## Size of Unions
@@ -1081,7 +1081,7 @@ impl<T> MaybeUninit<T> {
     ///
     /// # 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.
     #[unstable(feature = "maybe_uninit", issue = "53491")]
     pub unsafe fn into_inner(self) -> T {
@@ -1092,7 +1092,7 @@ impl<T> MaybeUninit<T> {
     ///
     /// # 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.
     #[unstable(feature = "maybe_uninit", issue = "53491")]
     pub unsafe fn get_ref(&self) -> &T {
@@ -1103,7 +1103,7 @@ impl<T> MaybeUninit<T> {
     ///
     /// # 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.
     #[unstable(feature = "maybe_uninit", issue = "53491")]
     pub unsafe fn get_mut(&mut self) -> &mut T {
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 62ccf6c865c..827e297c84d 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -120,7 +120,7 @@ pub use intrinsics::write_bytes;
 ///
 /// Additionally, if `T` is not [`Copy`], using the pointed-to value after
 /// 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
 /// dropped.
 ///
@@ -371,7 +371,7 @@ pub(crate) unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
 #[inline]
 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
-    // 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
     // #[repr(simd)], even if we don't actually use this struct directly.
     //
@@ -1005,7 +1005,7 @@ impl<T: ?Sized> *const T {
     /// # Null-unchecked version
     ///
     /// 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.
     ///
     /// ```
@@ -1625,7 +1625,7 @@ impl<T: ?Sized> *mut T {
     /// # Null-unchecked version
     ///
     /// 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.
     ///
     /// ```