about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-13 14:48:32 +0000
committerbors <bors@rust-lang.org>2022-07-13 14:48:32 +0000
commit0930ac91b9109e9ebc31ebe70620a2ec0fe08b57 (patch)
tree938855a3b8ee5bdbc9b59a3da2892c5fa90762e1
parenteabad8ea53235103e86688b2e39f63067a17ea87 (diff)
downloadrust-0930ac91b9109e9ebc31ebe70620a2ec0fe08b57.tar.gz
rust-0930ac91b9109e9ebc31ebe70620a2ec0fe08b57.zip
Fix typos
changelog: none
-rw-r--r--CHANGELOG.md4
-rw-r--r--book/src/usage.md2
-rw-r--r--clippy_lints/src/borrow_deref_ref.rs2
-rw-r--r--clippy_lints/src/large_enum_variant.rs2
-rw-r--r--clippy_lints/src/loops/manual_find.rs2
-rw-r--r--clippy_lints/src/matches/match_same_arms.rs2
-rw-r--r--clippy_lints/src/mismatching_type_param_order.rs2
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs2
-rw-r--r--clippy_utils/src/visitors.rs2
-rw-r--r--tests/ui/if_let_mutex.rs2
-rw-r--r--tests/ui/inconsistent_struct_constructor.fixed2
-rw-r--r--tests/ui/inconsistent_struct_constructor.rs2
-rw-r--r--tests/ui/map_flatten_fixable.fixed2
-rw-r--r--tests/ui/map_flatten_fixable.rs2
-rw-r--r--tests/ui/map_flatten_fixable.stderr4
-rw-r--r--tests/ui/same_name_method.rs2
-rw-r--r--tests/ui/transmutes_expressible_as_ptr_casts.fixed2
-rw-r--r--tests/ui/transmutes_expressible_as_ptr_casts.rs2
-rw-r--r--tests/ui/wildcard_imports.fixed2
-rw-r--r--tests/ui/wildcard_imports.rs2
20 files changed, 22 insertions, 22 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b792736a6a..201929ec11c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -364,7 +364,7 @@ Released 2022-04-07
 
 * [`needless_borrow`]: Prevent mutable borrows being moved and suggest removing the borrow on method calls
   [#8217](https://github.com/rust-lang/rust-clippy/pull/8217)
-* [`chars_next_cmp`]: Correctly excapes the suggestion
+* [`chars_next_cmp`]: Correctly escapes the suggestion
   [#8376](https://github.com/rust-lang/rust-clippy/pull/8376)
 * [`explicit_write`]: Add suggestions for `write!`s with format arguments
   [#8365](https://github.com/rust-lang/rust-clippy/pull/8365)
@@ -2525,7 +2525,7 @@ Released 2019-09-26
   * [`inherent_to_string_shadow_display`] [#4259](https://github.com/rust-lang/rust-clippy/pull/4259)
   * [`type_repetition_in_bounds`] [#3766](https://github.com/rust-lang/rust-clippy/pull/3766)
   * [`try_err`] [#4222](https://github.com/rust-lang/rust-clippy/pull/4222)
-* Move `{unnnecessary,panicking}_unwrap` out of nursery [#4307](https://github.com/rust-lang/rust-clippy/pull/4307)
+* Move `{unnecessary,panicking}_unwrap` out of nursery [#4307](https://github.com/rust-lang/rust-clippy/pull/4307)
 * Extend the `use_self` lint to suggest uses of `Self::Variant` [#4308](https://github.com/rust-lang/rust-clippy/pull/4308)
 * Improve suggestion for needless return [#4262](https://github.com/rust-lang/rust-clippy/pull/4262)
 * Add auto-fixable suggestion for `let_unit` [#4337](https://github.com/rust-lang/rust-clippy/pull/4337)
diff --git a/book/src/usage.md b/book/src/usage.md
index 337680aa313..f03967d88bc 100644
--- a/book/src/usage.md
+++ b/book/src/usage.md
@@ -56,7 +56,7 @@ For more information on configuring lint levels, see the [rustc documentation].
 Clippy has lint groups which are allow-by-default. This means, that you will
 have to enable the lints in those groups manually.
 
-For a full list of all lints with their description and examples, please refere
+For a full list of all lints with their description and examples, please refer
 to [Clippy's lint list]. The two most important allow-by-default groups are
 described below:
 
diff --git a/clippy_lints/src/borrow_deref_ref.rs b/clippy_lints/src/borrow_deref_ref.rs
index 1582ec9ee5c..937765b6614 100644
--- a/clippy_lints/src/borrow_deref_ref.rs
+++ b/clippy_lints/src/borrow_deref_ref.rs
@@ -22,7 +22,7 @@ declare_clippy_lint! {
     /// ```
     /// let x = &12;
     /// let addr_x = &x as *const _ as usize;
-    /// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggerd.
+    /// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggered.
     ///                                         // But if we fix it, assert will fail.
     /// assert_ne!(addr_x, addr_y);
     /// ```
diff --git a/clippy_lints/src/large_enum_variant.rs b/clippy_lints/src/large_enum_variant.rs
index 9be057bcf90..c58df126d62 100644
--- a/clippy_lints/src/large_enum_variant.rs
+++ b/clippy_lints/src/large_enum_variant.rs
@@ -30,7 +30,7 @@ declare_clippy_lint! {
     /// For types that implement `Copy`, the suggestion to `Box` a variant's
     /// data would require removing the trait impl. The types can of course
     /// still be `Clone`, but that is worse ergonomically. Depending on the
-    /// use case it may be possible to store the large data in an auxillary
+    /// use case it may be possible to store the large data in an auxiliary
     /// structure (e.g. Arena or ECS).
     ///
     /// The lint will ignore generic types if the layout depends on the
diff --git a/clippy_lints/src/loops/manual_find.rs b/clippy_lints/src/loops/manual_find.rs
index 33736d6d4e6..215c83a7edf 100644
--- a/clippy_lints/src/loops/manual_find.rs
+++ b/clippy_lints/src/loops/manual_find.rs
@@ -139,7 +139,7 @@ fn last_stmt_and_ret<'tcx>(
     if_chain! {
         // This should be the loop
         if let Some((node_hir, Node::Stmt(..))) = parent_iter.next();
-        // This should be the funciton body
+        // This should be the function body
         if let Some((_, Node::Block(block))) = parent_iter.next();
         if let Some((last_stmt, last_ret)) = extract(block);
         if last_stmt.hir_id == node_hir;
diff --git a/clippy_lints/src/matches/match_same_arms.rs b/clippy_lints/src/matches/match_same_arms.rs
index 61d28b15066..582782f245f 100644
--- a/clippy_lints/src/matches/match_same_arms.rs
+++ b/clippy_lints/src/matches/match_same_arms.rs
@@ -365,7 +365,7 @@ impl<'a> NormalizedPat<'a> {
             (Self::Slice(pats, None), Self::Slice(front, Some(back)))
             | (Self::Slice(front, Some(back)), Self::Slice(pats, None)) => {
                 // Here `pats` is an exact size match. If the combined lengths of `front` and `back` are greater
-                // then the minium length required will be greater than the length of `pats`.
+                // then the minimum length required will be greater than the length of `pats`.
                 if pats.len() < front.len() + back.len() {
                     return false;
                 }
diff --git a/clippy_lints/src/mismatching_type_param_order.rs b/clippy_lints/src/mismatching_type_param_order.rs
index d466d54a6ba..254d9a70010 100644
--- a/clippy_lints/src/mismatching_type_param_order.rs
+++ b/clippy_lints/src/mismatching_type_param_order.rs
@@ -9,7 +9,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
 declare_clippy_lint! {
     /// ### What it does
     /// Checks for type parameters which are positioned inconsistently between
-    /// a type definition and impl block. Specifically, a paramater in an impl
+    /// a type definition and impl block. Specifically, a parameter in an impl
     /// block which has the same name as a parameter in the type def, but is in
     /// a different place.
     ///
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 3010fc0223c..aaeca47677d 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -1018,7 +1018,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
 /// This visitor finds the highest applicability value in the visited expressions
 struct ApplicabilityResolver<'a, 'hir> {
     cx: &'a LateContext<'hir>,
-    /// This is the index of hightest `Applicability` for `paths::APPLICABILITY_VALUES`
+    /// This is the index of highest `Applicability` for `paths::APPLICABILITY_VALUES`
     applicability_index: Option<usize>,
 }
 
diff --git a/clippy_utils/src/visitors.rs b/clippy_utils/src/visitors.rs
index 0b9f75238a6..bae8ad9f565 100644
--- a/clippy_utils/src/visitors.rs
+++ b/clippy_utils/src/visitors.rs
@@ -30,7 +30,7 @@ impl Continue for () {
     }
 }
 
-/// Allows for controlled descent whe using visitor functions. Use `()` instead when always
+/// Allows for controlled descent when using visitor functions. Use `()` instead when always
 /// descending into child nodes.
 #[derive(Clone, Copy)]
 pub enum Descend {
diff --git a/tests/ui/if_let_mutex.rs b/tests/ui/if_let_mutex.rs
index 58feae422a3..6cbfafbb38b 100644
--- a/tests/ui/if_let_mutex.rs
+++ b/tests/ui/if_let_mutex.rs
@@ -27,7 +27,7 @@ fn if_let_option() {
     };
 }
 
-// When mutexs are different don't warn
+// When mutexes are different don't warn
 fn if_let_different_mutex() {
     let m = Mutex::new(Some(0_u8));
     let other = Mutex::new(None::<u8>);
diff --git a/tests/ui/inconsistent_struct_constructor.fixed b/tests/ui/inconsistent_struct_constructor.fixed
index eb66d1afddc..74ba2f1c5e7 100644
--- a/tests/ui/inconsistent_struct_constructor.fixed
+++ b/tests/ui/inconsistent_struct_constructor.fixed
@@ -36,7 +36,7 @@ mod without_base {
         // issue #7069.
         new_foo!();
 
-        // Shoule NOT lint because the order is the same as in the definition.
+        // Should NOT lint because the order is the same as in the definition.
         Foo { x, y, z };
 
         // Should NOT lint because z is not a shorthand init.
diff --git a/tests/ui/inconsistent_struct_constructor.rs b/tests/ui/inconsistent_struct_constructor.rs
index 5caadc7c620..ba96e1e330f 100644
--- a/tests/ui/inconsistent_struct_constructor.rs
+++ b/tests/ui/inconsistent_struct_constructor.rs
@@ -36,7 +36,7 @@ mod without_base {
         // issue #7069.
         new_foo!();
 
-        // Shoule NOT lint because the order is the same as in the definition.
+        // Should NOT lint because the order is the same as in the definition.
         Foo { x, y, z };
 
         // Should NOT lint because z is not a shorthand init.
diff --git a/tests/ui/map_flatten_fixable.fixed b/tests/ui/map_flatten_fixable.fixed
index 9097a6b9967..312819a0a2c 100644
--- a/tests/ui/map_flatten_fixable.fixed
+++ b/tests/ui/map_flatten_fixable.fixed
@@ -58,7 +58,7 @@ fn issue8878() {
         .and_then(|_| {
 // we need some newlines
 // so that the span is big enough
-// for a splitted output of the diagnostic
+// for a split output of the diagnostic
             Some("")
  // whitespace beforehand is important as well
         });
diff --git a/tests/ui/map_flatten_fixable.rs b/tests/ui/map_flatten_fixable.rs
index 3916263404a..3fbf4f9a1b0 100644
--- a/tests/ui/map_flatten_fixable.rs
+++ b/tests/ui/map_flatten_fixable.rs
@@ -59,7 +59,7 @@ fn issue8878() {
         .map(|_| {
 // we need some newlines
 // so that the span is big enough
-// for a splitted output of the diagnostic
+// for a split output of the diagnostic
             Some("")
  // whitespace beforehand is important as well
         })
diff --git a/tests/ui/map_flatten_fixable.stderr b/tests/ui/map_flatten_fixable.stderr
index afaf6af66b2..c91f0b9ae94 100644
--- a/tests/ui/map_flatten_fixable.stderr
+++ b/tests/ui/map_flatten_fixable.stderr
@@ -78,7 +78,7 @@ LL |           .map(|_| {
    |  __________^
 LL | | // we need some newlines
 LL | | // so that the span is big enough
-LL | | // for a splitted output of the diagnostic
+LL | | // for a split output of the diagnostic
 ...  |
 LL | |         })
 LL | |         .flatten();
@@ -89,7 +89,7 @@ help: try replacing `map` with `and_then` and remove the `.flatten()`
 LL ~         .and_then(|_| {
 LL + // we need some newlines
 LL + // so that the span is big enough
-LL + // for a splitted output of the diagnostic
+LL + // for a split output of the diagnostic
 LL +             Some("")
 LL +  // whitespace beforehand is important as well
 LL ~         });
diff --git a/tests/ui/same_name_method.rs b/tests/ui/same_name_method.rs
index 9562b47f0c4..daef95a425c 100644
--- a/tests/ui/same_name_method.rs
+++ b/tests/ui/same_name_method.rs
@@ -62,7 +62,7 @@ mod should_lint {
         impl T1 for S {}
     }
 
-    mod mulitply_conflicit_trait {
+    mod multiply_conflicit_trait {
         use crate::{T1, T2};
 
         struct S;
diff --git a/tests/ui/transmutes_expressible_as_ptr_casts.fixed b/tests/ui/transmutes_expressible_as_ptr_casts.fixed
index b425cdd6cbf..539239fc18f 100644
--- a/tests/ui/transmutes_expressible_as_ptr_casts.fixed
+++ b/tests/ui/transmutes_expressible_as_ptr_casts.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 #![warn(clippy::transmutes_expressible_as_ptr_casts)]
-// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
+// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
 // would otherwise be responsible for
 #![warn(clippy::useless_transmute)]
 #![warn(clippy::transmute_ptr_to_ptr)]
diff --git a/tests/ui/transmutes_expressible_as_ptr_casts.rs b/tests/ui/transmutes_expressible_as_ptr_casts.rs
index 8fd57c59652..b9e446dc89a 100644
--- a/tests/ui/transmutes_expressible_as_ptr_casts.rs
+++ b/tests/ui/transmutes_expressible_as_ptr_casts.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 #![warn(clippy::transmutes_expressible_as_ptr_casts)]
-// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
+// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
 // would otherwise be responsible for
 #![warn(clippy::useless_transmute)]
 #![warn(clippy::transmute_ptr_to_ptr)]
diff --git a/tests/ui/wildcard_imports.fixed b/tests/ui/wildcard_imports.fixed
index b6f47ae906b..ef55f1c31a8 100644
--- a/tests/ui/wildcard_imports.fixed
+++ b/tests/ui/wildcard_imports.fixed
@@ -199,7 +199,7 @@ mod super_imports {
         }
     }
 
-    mod should_be_replaced_futher_inside {
+    mod should_be_replaced_further_inside {
         fn insidefoo() {}
         mod inner {
             use super::insidefoo;
diff --git a/tests/ui/wildcard_imports.rs b/tests/ui/wildcard_imports.rs
index eb404b7a3de..b8128514206 100644
--- a/tests/ui/wildcard_imports.rs
+++ b/tests/ui/wildcard_imports.rs
@@ -200,7 +200,7 @@ mod super_imports {
         }
     }
 
-    mod should_be_replaced_futher_inside {
+    mod should_be_replaced_further_inside {
         fn insidefoo() {}
         mod inner {
             use super::*;