about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-26 05:48:25 +0000
committerbors <bors@rust-lang.org>2022-10-26 05:48:25 +0000
commitec9edbcdd49c4af55ca9242cf4506982f57eb5d9 (patch)
tree04c820767d6a5c3cad134df0ef6307f3d12c3ca9
parent7182a6ba0d14a1b968ae81ef44b61dc718bdb385 (diff)
parent770362a691cb2049e87595a2123a9912637cee15 (diff)
downloadrust-ec9edbcdd49c4af55ca9242cf4506982f57eb5d9.tar.gz
rust-ec9edbcdd49c4af55ca9242cf4506982f57eb5d9.zip
Auto merge of #9723 - Rageking8:fix-dupe-word-typos, r=llogiq
Fix dupe word typos

changelog: fix some typos
-rw-r--r--clippy_lints/src/matches/significant_drop_in_scrutinee.rs2
-rw-r--r--clippy_utils/src/ty.rs2
-rw-r--r--tests/ui/manual_flatten.rs2
-rw-r--r--tests/ui/mut_range_bound.rs2
-rw-r--r--tests/ui/mut_range_bound.stderr2
5 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/matches/significant_drop_in_scrutinee.rs b/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
index 85269e533a0..93e4160c69b 100644
--- a/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
+++ b/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
@@ -226,7 +226,7 @@ impl<'a, 'tcx> SigDropHelper<'a, 'tcx> {
     /// This will try to set the current suggestion (so it can be moved into the suggestions vec
     /// later). If `allow_move_and_clone` is false, the suggestion *won't* be set -- this gives us
     /// an opportunity to look for another type in the chain that will be trivially copyable.
-    /// However, if we are at the the end of the chain, we want to accept whatever is there. (The
+    /// However, if we are at the end of the chain, we want to accept whatever is there. (The
     /// suggestion won't actually be output, but the diagnostic message will be output, so the user
     /// can determine the best way to handle the lint.)
     fn try_setting_current_suggestion(&mut self, expr: &'tcx Expr<'_>, allow_move_and_clone: bool) {
diff --git a/clippy_utils/src/ty.rs b/clippy_utils/src/ty.rs
index a15daec7c3c..f4a135f2b5b 100644
--- a/clippy_utils/src/ty.rs
+++ b/clippy_utils/src/ty.rs
@@ -711,7 +711,7 @@ impl core::ops::Add<u32> for EnumValue {
     }
 }
 
-/// Attempts to read the given constant as though it were an an enum value.
+/// Attempts to read the given constant as though it were an enum value.
 #[expect(clippy::cast_possible_truncation, clippy::cast_possible_wrap)]
 pub fn read_explicit_enum_value(tcx: TyCtxt<'_>, id: DefId) -> Option<EnumValue> {
     if let Ok(ConstValue::Scalar(Scalar::Int(value))) = tcx.const_eval_poly(id) {
diff --git a/tests/ui/manual_flatten.rs b/tests/ui/manual_flatten.rs
index 96cd87c0e19..552213a7ff2 100644
--- a/tests/ui/manual_flatten.rs
+++ b/tests/ui/manual_flatten.rs
@@ -10,7 +10,7 @@ fn main() {
         }
     }
 
-    // Test for loop over implicitly implicitly adjusted `Iterator` with `if let` statement
+    // Test for loop over implicitly adjusted `Iterator` with `if let` statement
     let y: Vec<Result<i32, i32>> = vec![];
     for n in y.clone() {
         if let Ok(n) = n {
diff --git a/tests/ui/mut_range_bound.rs b/tests/ui/mut_range_bound.rs
index e1ae1ef9282..7fdeb27ed98 100644
--- a/tests/ui/mut_range_bound.rs
+++ b/tests/ui/mut_range_bound.rs
@@ -76,7 +76,7 @@ fn mut_range_bound_no_immediate_break() {
     let mut n = 3;
     for i in n..10 {
         if n == 4 {
-            n = 1; // FIXME: warning because is is not immediately followed by break
+            n = 1; // FIXME: warning because it is not immediately followed by break
             let _ = 2;
             break;
         }
diff --git a/tests/ui/mut_range_bound.stderr b/tests/ui/mut_range_bound.stderr
index e0c8dced382..b679b7a0aaf 100644
--- a/tests/ui/mut_range_bound.stderr
+++ b/tests/ui/mut_range_bound.stderr
@@ -50,7 +50,7 @@ LL |         m = 2; // warning because it is not immediately followed by break
 error: attempt to mutate range bound within loop
   --> $DIR/mut_range_bound.rs:79:13
    |
-LL |             n = 1; // FIXME: warning because is is not immediately followed by break
+LL |             n = 1; // FIXME: warning because it is not immediately followed by break
    |             ^
    |
    = note: the range of the loop is unchanged