diff options
| author | Christoph Beberweil <christoph.beberweil@protonmail.com> | 2023-11-24 17:29:03 +0100 |
|---|---|---|
| committer | Christoph Beberweil <christoph.beberweil@protonmail.com> | 2023-11-24 17:29:03 +0100 |
| commit | bce869f0c05ffe2ce341e79e2f4cf9c0a06078c1 (patch) | |
| tree | 234810cbf448077ab0c941914ba69997d68c182c | |
| parent | 2512341fe45f62c5e1e5aea0d70a0430b73e639b (diff) | |
| download | rust-bce869f0c05ffe2ce341e79e2f4cf9c0a06078c1.tar.gz rust-bce869f0c05ffe2ce341e79e2f4cf9c0a06078c1.zip | |
fix: 7125 lint message should start with a small letter
| -rw-r--r-- | clippy_lints/src/loops/single_element_loop.rs | 2 | ||||
| -rw-r--r-- | tests/ui/single_element_loop.stderr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/loops/single_element_loop.rs b/clippy_lints/src/loops/single_element_loop.rs index b3db88bd098..b5786231a1a 100644 --- a/clippy_lints/src/loops/single_element_loop.rs +++ b/clippy_lints/src/loops/single_element_loop.rs @@ -95,7 +95,7 @@ pub(super) fn check<'tcx>( cx, SINGLE_ELEMENT_LOOP, arg.span, - format!("This loops only once with {pat_snip} being {range_expr}").as_str(), + format!("this loops only once with {pat_snip} being {range_expr}").as_str(), "did you mean to iterate over the range instead?", sugg.to_string(), Applicability::Unspecified, diff --git a/tests/ui/single_element_loop.stderr b/tests/ui/single_element_loop.stderr index 6d2a89a706a..c45f36b1d1c 100644 --- a/tests/ui/single_element_loop.stderr +++ b/tests/ui/single_element_loop.stderr @@ -32,25 +32,25 @@ LL + dbg!(item); LL + } | -error: This loops only once with item being 0..5 +error: this loops only once with item being 0..5 --> $DIR/single_element_loop.rs:16:17 | LL | for item in &[0..5] { | ^^^^^^^ help: did you mean to iterate over the range instead?: `0..5` -error: This loops only once with item being 0..5 +error: this loops only once with item being 0..5 --> $DIR/single_element_loop.rs:20:17 | LL | for item in [0..5].iter_mut() { | ^^^^^^^^^^^^^^^^^ help: did you mean to iterate over the range instead?: `0..5` -error: This loops only once with item being 0..5 +error: this loops only once with item being 0..5 --> $DIR/single_element_loop.rs:24:17 | LL | for item in [0..5] { | ^^^^^^ help: did you mean to iterate over the range instead?: `0..5` -error: This loops only once with item being 0..5 +error: this loops only once with item being 0..5 --> $DIR/single_element_loop.rs:28:17 | LL | for item in [0..5].into_iter() { |
