about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-29 05:00:52 +0000
committerbors <bors@rust-lang.org>2023-10-29 05:00:52 +0000
commita40958a5982e2cd76235239af6a5b0edb78eab89 (patch)
treef43bf2218e4e0b840004635faf4778a739072769
parent5852ca84433b87b95916ec226784a11091f58af1 (diff)
parent2030c58b81bffab3277913af99472055886e319e (diff)
downloadrust-a40958a5982e2cd76235239af6a5b0edb78eab89.tar.gz
rust-a40958a5982e2cd76235239af6a5b0edb78eab89.zip
Auto merge of #11730 - cuishuang:master, r=dswij
Fix some typos

changelog: none
-rw-r--r--clippy_lints/src/attrs.rs2
-rw-r--r--clippy_lints/src/from_over_into.rs6
-rw-r--r--clippy_lints/src/matches/single_match.rs2
-rw-r--r--clippy_lints/src/reserve_after_initialization.rs2
-rw-r--r--clippy_lints/src/unnecessary_map_on_constructor.rs2
-rw-r--r--clippy_lints/src/utils/internal_lints/almost_standard_lint_formulation.rs2
6 files changed, 8 insertions, 8 deletions
diff --git a/clippy_lints/src/attrs.rs b/clippy_lints/src/attrs.rs
index c720eba11b1..7a5e3d3f30f 100644
--- a/clippy_lints/src/attrs.rs
+++ b/clippy_lints/src/attrs.rs
@@ -409,7 +409,7 @@ declare_clippy_lint! {
     ///
     /// ### Why is this bad?
     /// Misspelling `feature` as `features` can be sometimes hard to spot. It
-    /// may cause conditional compilation not work quitely.
+    /// may cause conditional compilation not work quietly.
     ///
     /// ### Example
     /// ```no_run
diff --git a/clippy_lints/src/from_over_into.rs b/clippy_lints/src/from_over_into.rs
index 948d709ce3f..4ccdba910eb 100644
--- a/clippy_lints/src/from_over_into.rs
+++ b/clippy_lints/src/from_over_into.rs
@@ -110,12 +110,12 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
     extract_msrv_attr!(LateContext);
 }
 
-/// Finds the occurences of `Self` and `self`
+/// Finds the occurrences of `Self` and `self`
 struct SelfFinder<'a, 'tcx> {
     cx: &'a LateContext<'tcx>,
-    /// Occurences of `Self`
+    /// Occurrences of `Self`
     upper: Vec<Span>,
-    /// Occurences of `self`
+    /// Occurrences of `self`
     lower: Vec<Span>,
     /// If any of the `self`/`Self` usages were from an expansion, or the body contained a binding
     /// already named `val`
diff --git a/clippy_lints/src/matches/single_match.rs b/clippy_lints/src/matches/single_match.rs
index 6b05c6bfffd..5b92c0f7dc8 100644
--- a/clippy_lints/src/matches/single_match.rs
+++ b/clippy_lints/src/matches/single_match.rs
@@ -51,7 +51,7 @@ pub(crate) fn check(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>], expr:
             // block with 2+ statements or 1 expr and 1+ statement
             Some(els)
         } else {
-            // not a block or an emtpy block w/ comments, don't lint
+            // not a block or an empty block w/ comments, don't lint
             return;
         };
 
diff --git a/clippy_lints/src/reserve_after_initialization.rs b/clippy_lints/src/reserve_after_initialization.rs
index f1ef3709514..c2294303082 100644
--- a/clippy_lints/src/reserve_after_initialization.rs
+++ b/clippy_lints/src/reserve_after_initialization.rs
@@ -29,7 +29,7 @@ declare_clippy_lint! {
     #[clippy::version = "1.73.0"]
     pub RESERVE_AFTER_INITIALIZATION,
     complexity,
-    "`reserve` called immediatly after `Vec` creation"
+    "`reserve` called immediately after `Vec` creation"
 }
 impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]);
 
diff --git a/clippy_lints/src/unnecessary_map_on_constructor.rs b/clippy_lints/src/unnecessary_map_on_constructor.rs
index f9d9650db04..b154f75c7ca 100644
--- a/clippy_lints/src/unnecessary_map_on_constructor.rs
+++ b/clippy_lints/src/unnecessary_map_on_constructor.rs
@@ -9,7 +9,7 @@ use rustc_span::sym;
 
 declare_clippy_lint! {
     /// ### What it does
-    /// Suggest removing the use of a may (or map_err) method when an Option or Result is being construted.
+    /// Suggest removing the use of a may (or map_err) method when an Option or Result is being constructed.
     ///
     /// ### Why is this bad?
     /// It introduces unnecessary complexity. In this case the function can be used directly and
diff --git a/clippy_lints/src/utils/internal_lints/almost_standard_lint_formulation.rs b/clippy_lints/src/utils/internal_lints/almost_standard_lint_formulation.rs
index 570a88a0ed2..d78f67c05f0 100644
--- a/clippy_lints/src/utils/internal_lints/almost_standard_lint_formulation.rs
+++ b/clippy_lints/src/utils/internal_lints/almost_standard_lint_formulation.rs
@@ -11,7 +11,7 @@ declare_clippy_lint! {
     /// Checks if lint formulations have a standardized format.
     ///
     /// ### Why is this bad?
-    /// It's not neccessarily bad, but we try to enforce a standard in Clippy.
+    /// It's not necessarily bad, but we try to enforce a standard in Clippy.
     ///
     /// ### Example
     /// `Checks for use...` can be written as `Checks for usage...` .