]> git.lizzy.rs Git - rust.git/commitdiff
fix dupe word typos
authorRageking8 <tomleetyt@gmail.com>
Wed, 26 Oct 2022 04:24:37 +0000 (12:24 +0800)
committerRageking8 <tomleetyt@gmail.com>
Wed, 26 Oct 2022 04:24:37 +0000 (12:24 +0800)
clippy_lints/src/matches/significant_drop_in_scrutinee.rs
clippy_utils/src/ty.rs
tests/ui/manual_flatten.rs
tests/ui/mut_range_bound.rs
tests/ui/mut_range_bound.stderr

index 85269e533a066861ad3454d82d0a67185ee3277c..93e4160c69b558e74fa6b390246973d23d4496c2 100644 (file)
@@ -226,7 +226,7 @@ fn replace_current_sig_drop(
     /// 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) {
index a15daec7c3ce3ed77f0a284c185c01eb5a07531d..f4a135f2b5bdd62fcd2bc0dc436a4719854490c5 100644 (file)
@@ -711,7 +711,7 @@ fn add(self, n: u32) -> Self::Output {
     }
 }
 
-/// 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) {
index 96cd87c0e19a7079f0940975ebd69241f19dd5b8..552213a7ff229e7fb97bc08011dbcc1a459680ae 100644 (file)
@@ -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 {
index e1ae1ef928223bf748cd6c21c5bf2af27d962a43..7fdeb27ed988fcdc39c83daef4d623fe930405ab 100644 (file)
@@ -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;
         }
index e0c8dced382efc0b390f0d07f601d817c0141b73..b679b7a0aaf82ff7e351c2497fb216df920c2622 100644 (file)
@@ -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