about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-06-25 13:18:56 -0700
committerEric Huss <eric@huss.org>2021-06-25 13:18:56 -0700
commit6235e6f93f85134b82500656d9120a58ec7ca328 (patch)
treea7ca566edd67d8efbb5bdeb1b9f6eee34479483e
parentf726dbe934d7dcf8ac72e5a8863703e64bb049ae (diff)
downloadrust-6235e6f93f85134b82500656d9120a58ec7ca328.tar.gz
rust-6235e6f93f85134b82500656d9120a58ec7ca328.zip
Fix a few misspellings.
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs2
-rw-r--r--library/alloc/src/collections/btree/fix.rs2
-rw-r--r--library/alloc/src/collections/btree/node.rs2
-rw-r--r--library/core/src/cmp.rs2
-rw-r--r--library/core/src/iter/adapters/mod.rs2
-rw-r--r--library/core/src/mem/maybe_uninit.rs10
-rw-r--r--library/core/src/ptr/metadata.rs2
-rw-r--r--library/proc_macro/src/bridge/rpc.rs2
-rw-r--r--library/std/src/keyword_docs.rs2
-rw-r--r--library/std/src/os/unix/process.rs2
-rw-r--r--library/std/src/process.rs2
-rw-r--r--library/std/src/sys/hermit/mutex.rs2
12 files changed, 16 insertions, 16 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index a2f60142ffc..40adf1b4ea7 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -3280,7 +3280,7 @@ declare_lint! {
     ///
     /// In Rust 2021, one of the important introductions is the [prelude changes], which add
     /// `TryFrom`, `TryInto`, and `FromIterator` into the standard library's prelude. Since this
-    /// results in an amiguity as to which method/function to call when an existing `try_into`
+    /// results in an ambiguity as to which method/function to call when an existing `try_into`
     ///  method is called via dot-call syntax or a `try_from`/`from_iter` associated function
     ///  is called directly on a type.
     ///
diff --git a/library/alloc/src/collections/btree/fix.rs b/library/alloc/src/collections/btree/fix.rs
index af87a9b956a..c4861817dd0 100644
--- a/library/alloc/src/collections/btree/fix.rs
+++ b/library/alloc/src/collections/btree/fix.rs
@@ -3,7 +3,7 @@ use super::node::{marker, ForceResult::*, Handle, LeftOrRight::*, NodeRef, Root}
 
 impl<'a, K: 'a, V: 'a> NodeRef<marker::Mut<'a>, K, V, marker::LeafOrInternal> {
     /// Stocks up a possibly underfull node by merging with or stealing from a
-    /// sibling. If succesful but at the cost of shrinking the parent node,
+    /// sibling. If successful but at the cost of shrinking the parent node,
     /// returns that shrunk parent node. Returns an `Err` if the node is
     /// an empty root.
     fn fix_node_through_parent(
diff --git a/library/alloc/src/collections/btree/node.rs b/library/alloc/src/collections/btree/node.rs
index 3c453529ba8..30d237d8bbc 100644
--- a/library/alloc/src/collections/btree/node.rs
+++ b/library/alloc/src/collections/btree/node.rs
@@ -167,7 +167,7 @@ type BoxedNode<K, V> = NonNull<LeafNode<K, V>>;
 ///   carry a lifetime, because we want it to return `&'a` references.
 ///   Therefore, we define it only for the least powerful type `Immut<'a>`.
 /// - We cannot get implicit coercion from say `Mut<'a>` to `Immut<'a>`.
-///   Therefore, we have to explicitly call `reborrow` on a more powerfull
+///   Therefore, we have to explicitly call `reborrow` on a more powerful
 ///   `NodeRef` in order to reach a method like `into_kv`.
 ///
 /// All methods on `NodeRef` that return some kind of reference, either:
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index 6c2f09514a6..879deed3bed 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -41,7 +41,7 @@ use self::Ordering::*;
 ///
 /// If [`PartialOrd`] or [`Ord`] are also implemented for `Self` and `Rhs`, their methods must also
 /// be consistent with `PartialEq` (see the documentation of those traits for the exact
-/// requirememts). It's easy to accidentally make them disagree by deriving some of the traits and
+/// requirements). It's easy to accidentally make them disagree by deriving some of the traits and
 /// manually implementing others.
 ///
 /// The equality relation `==` must satisfy the following conditions
diff --git a/library/core/src/iter/adapters/mod.rs b/library/core/src/iter/adapters/mod.rs
index 9fdd4fca04c..a3fbf4d9c38 100644
--- a/library/core/src/iter/adapters/mod.rs
+++ b/library/core/src/iter/adapters/mod.rs
@@ -54,7 +54,7 @@ pub use self::zip::TrustedRandomAccess;
 #[unstable(feature = "iter_zip", issue = "83574")]
 pub use self::zip::zip;
 
-/// This trait provides transitive access to source-stage in an interator-adapter pipeline
+/// This trait provides transitive access to source-stage in an iterator-adapter pipeline
 /// under the conditions that
 /// * the iterator source `S` itself implements `SourceIter<Source = S>`
 /// * there is a delegating implementation of this trait for each adapter in the pipeline between
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs
index de3367e5e52..3dfbd98fa6c 100644
--- a/library/core/src/mem/maybe_uninit.rs
+++ b/library/core/src/mem/maybe_uninit.rs
@@ -980,7 +980,7 @@ impl<T> MaybeUninit<T> {
         this.as_mut_ptr() as *mut T
     }
 
-    /// Copies the elements from `src` to `this`, returning a mutable reference to the now initalized contents of `this`.
+    /// Copies the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`.
     ///
     /// If `T` does not implement `Copy`, use [`write_slice_cloned`]
     ///
@@ -1033,12 +1033,12 @@ impl<T> MaybeUninit<T> {
 
         this.copy_from_slice(uninit_src);
 
-        // SAFETY: Valid elements have just been copied into `this` so it is initalized
+        // SAFETY: Valid elements have just been copied into `this` so it is initialized
         unsafe { MaybeUninit::slice_assume_init_mut(this) }
     }
 
-    /// Clones the elements from `src` to `this`, returning a mutable reference to the now initalized contents of `this`.
-    /// Any already initalized elements will not be dropped.
+    /// Clones the elements from `src` to `this`, returning a mutable reference to the now initialized contents of `this`.
+    /// Any already initialized elements will not be dropped.
     ///
     /// If `T` implements `Copy`, use [`write_slice`]
     ///
@@ -1124,7 +1124,7 @@ impl<T> MaybeUninit<T> {
 
         super::forget(guard);
 
-        // SAFETY: Valid elements have just been written into `this` so it is initalized
+        // SAFETY: Valid elements have just been written into `this` so it is initialized
         unsafe { MaybeUninit::slice_assume_init_mut(this) }
     }
 }
diff --git a/library/core/src/ptr/metadata.rs b/library/core/src/ptr/metadata.rs
index 7c7dce0ce74..287ae69acd1 100644
--- a/library/core/src/ptr/metadata.rs
+++ b/library/core/src/ptr/metadata.rs
@@ -101,7 +101,7 @@ pub const fn metadata<T: ?Sized>(ptr: *const T) -> <T as Pointee>::Metadata {
 ///
 /// This function is safe but the returned pointer is not necessarily safe to dereference.
 /// For slices, see the documentation of [`slice::from_raw_parts`] for safety requirements.
-/// For trait objects, the metadata must come from a pointer to the same underlying ereased type.
+/// For trait objects, the metadata must come from a pointer to the same underlying erased type.
 ///
 /// [`slice::from_raw_parts`]: crate::slice::from_raw_parts
 #[unstable(feature = "ptr_metadata", issue = "81513")]
diff --git a/library/proc_macro/src/bridge/rpc.rs b/library/proc_macro/src/bridge/rpc.rs
index 588e6ded0f4..42432563faf 100644
--- a/library/proc_macro/src/bridge/rpc.rs
+++ b/library/proc_macro/src/bridge/rpc.rs
@@ -246,7 +246,7 @@ impl<S> DecodeMut<'_, '_, S> for String {
     }
 }
 
-/// Simplied version of panic payloads, ignoring
+/// Simplified version of panic payloads, ignoring
 /// types other than `&'static str` and `String`.
 pub enum PanicMessage {
     StaticStr(&'static str),
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs
index a609567ce93..605bd33a4bf 100644
--- a/library/std/src/keyword_docs.rs
+++ b/library/std/src/keyword_docs.rs
@@ -971,7 +971,7 @@ mod match_keyword {}
 /// ```
 ///
 /// Like [`struct`]s and [`enum`]s, a module and its content are private by
-/// default, unaccessible to code outside of the module.
+/// default, inaccessible to code outside of the module.
 ///
 /// To learn more about allowing access, see the documentation for the [`pub`]
 /// keyword.
diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs
index 3dc389b7582..f3b5227df86 100644
--- a/library/std/src/os/unix/process.rs
+++ b/library/std/src/os/unix/process.rs
@@ -226,7 +226,7 @@ pub trait ExitStatusExt: Sealed {
     ///
     /// Panics on an attempt to make an `ExitStatusError` from a wait status of `0`.
     ///
-    /// Making an `ExitStatus` always succeds and never panics.
+    /// Making an `ExitStatus` always succeeds and never panics.
     #[stable(feature = "exit_status_from", since = "1.12.0")]
     fn from_raw(raw: i32) -> Self;
 
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 6903ba90560..6f523728d7b 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -1568,7 +1568,7 @@ impl ExitStatusError {
 
     /// Reports the exit code, if applicable, from an `ExitStatusError`, as a `NonZero`
     ///
-    /// This is exaclty like [`code()`](Self::code), except that it returns a `NonZeroI32`.
+    /// This is exactly like [`code()`](Self::code), except that it returns a `NonZeroI32`.
     ///
     /// Plain `code`, returning a plain integer, is provided because is is often more convenient.
     /// The returned value from `code()` is indeed also nonzero; use `code_nonzero()` when you want
diff --git a/library/std/src/sys/hermit/mutex.rs b/library/std/src/sys/hermit/mutex.rs
index 885389ca54c..4221799114b 100644
--- a/library/std/src/sys/hermit/mutex.rs
+++ b/library/std/src/sys/hermit/mutex.rs
@@ -14,7 +14,7 @@ use crate::sys::hermit::abi;
 /// This structure behaves a lot like a common mutex. There are some differences:
 ///
 /// - By using busy waiting, it can be used outside the runtime.
-/// - It is a so called ticket lock and is completly fair.
+/// - It is a so called ticket lock and is completely fair.
 #[cfg_attr(target_arch = "x86_64", repr(align(128)))]
 #[cfg_attr(not(target_arch = "x86_64"), repr(align(64)))]
 struct Spinlock<T: ?Sized> {