about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-23 14:46:52 +0000
committerbors <bors@rust-lang.org>2023-12-23 14:46:52 +0000
commit618fd4b494b428411d7b81e63e5172e9b1dc25b1 (patch)
tree7c333370e842fb4e5889646506f21a0c760f816f
parent858d96d63a9bf11037eef2e252be5c4bc3570bec (diff)
parent3a4d99ec42a6135c5b2fff7a91c1048302b04165 (diff)
downloadrust-618fd4b494b428411d7b81e63e5172e9b1dc25b1.tar.gz
rust-618fd4b494b428411d7b81e63e5172e9b1dc25b1.zip
Auto merge of #11999 - Takashiidobe:fix-typo-in-infinite-loop-lint, r=xFrednet
fix typo in infinite loop lint

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: This fixes a small typo introduced in https://github.com/rust-lang/rust-clippy/pull/11829
-rw-r--r--clippy_lints/src/loops/infinite_loop.rs2
-rw-r--r--tests/ui/infinite_loops.stderr30
2 files changed, 16 insertions, 16 deletions
diff --git a/clippy_lints/src/loops/infinite_loop.rs b/clippy_lints/src/loops/infinite_loop.rs
index 9b88dd76e5c..5e099f1e76f 100644
--- a/clippy_lints/src/loops/infinite_loop.rs
+++ b/clippy_lints/src/loops/infinite_loop.rs
@@ -49,7 +49,7 @@ pub(super) fn check<'tcx>(
             if let FnRetTy::DefaultReturn(ret_span) = parent_fn_ret {
                 diag.span_suggestion(
                     ret_span,
-                    "if this is intentional, consider specifing `!` as function return",
+                    "if this is intentional, consider specifying `!` as function return",
                     " -> !",
                     Applicability::MaybeIncorrect,
                 );
diff --git a/tests/ui/infinite_loops.stderr b/tests/ui/infinite_loops.stderr
index f58b3cebbc3..771fbfa44ee 100644
--- a/tests/ui/infinite_loops.stderr
+++ b/tests/ui/infinite_loops.stderr
@@ -9,7 +9,7 @@ LL | |     }
    |
    = note: `-D clippy::infinite-loop` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::infinite_loop)]`
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn no_break() -> ! {
    |               ++++
@@ -26,7 +26,7 @@ LL | |         do_something();
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn all_inf() -> ! {
    |              ++++
@@ -43,7 +43,7 @@ LL | |             }
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn all_inf() -> ! {
    |              ++++
@@ -57,7 +57,7 @@ LL | |                 do_something();
 LL | |             }
    | |_____________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn all_inf() -> ! {
    |              ++++
@@ -84,7 +84,7 @@ LL | |         do_something();
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn no_break_never_ret_noise() -> ! {
    |                               ++++
@@ -101,7 +101,7 @@ LL | |         }
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn break_inner_but_not_outer_1(cond: bool) -> ! {
    |                                            ++++
@@ -118,7 +118,7 @@ LL | |         }
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn break_inner_but_not_outer_2(cond: bool) -> ! {
    |                                            ++++
@@ -132,7 +132,7 @@ LL | |             do_something();
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn break_outer_but_not_inner() -> ! {
    |                                ++++
@@ -149,7 +149,7 @@ LL | |             }
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn break_wrong_loop(cond: bool) -> ! {
    |                                 ++++
@@ -166,7 +166,7 @@ LL | |         }
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn match_like() -> ! {
    |                 ++++
@@ -180,7 +180,7 @@ LL | |         let _x = matches!(result, Ok(v) if v != 0).then_some(0);
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn match_like() -> ! {
    |                 ++++
@@ -197,7 +197,7 @@ LL | |         });
 LL | |     }
    | |_____^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL | fn match_like() -> ! {
    |                 ++++
@@ -211,7 +211,7 @@ LL | |             do_something();
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL |     fn problematic_trait_method() -> ! {
    |                                   ++++
@@ -225,7 +225,7 @@ LL | |             do_something();
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL |     fn could_be_problematic() -> ! {
    |                               ++++
@@ -239,7 +239,7 @@ LL | |             do_something();
 LL | |         }
    | |_________^
    |
-help: if this is intentional, consider specifing `!` as function return
+help: if this is intentional, consider specifying `!` as function return
    |
 LL |     let _loop_forever = || -> ! {
    |                            ++++