Skip to content

Commit bce869f

Browse files
fix: 7125 lint message should start with a small letter
1 parent 2512341 commit bce869f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/loops/single_element_loop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(super) fn check<'tcx>(
9595
cx,
9696
SINGLE_ELEMENT_LOOP,
9797
arg.span,
98-
format!("This loops only once with {pat_snip} being {range_expr}").as_str(),
98+
format!("this loops only once with {pat_snip} being {range_expr}").as_str(),
9999
"did you mean to iterate over the range instead?",
100100
sugg.to_string(),
101101
Applicability::Unspecified,

tests/ui/single_element_loop.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@ LL + dbg!(item);
3232
LL + }
3333
|
3434

35-
error: This loops only once with item being 0..5
35+
error: this loops only once with item being 0..5
3636
--> $DIR/single_element_loop.rs:16:17
3737
|
3838
LL | for item in &[0..5] {
3939
| ^^^^^^^ help: did you mean to iterate over the range instead?: `0..5`
4040

41-
error: This loops only once with item being 0..5
41+
error: this loops only once with item being 0..5
4242
--> $DIR/single_element_loop.rs:20:17
4343
|
4444
LL | for item in [0..5].iter_mut() {
4545
| ^^^^^^^^^^^^^^^^^ help: did you mean to iterate over the range instead?: `0..5`
4646

47-
error: This loops only once with item being 0..5
47+
error: this loops only once with item being 0..5
4848
--> $DIR/single_element_loop.rs:24:17
4949
|
5050
LL | for item in [0..5] {
5151
| ^^^^^^ help: did you mean to iterate over the range instead?: `0..5`
5252

53-
error: This loops only once with item being 0..5
53+
error: this loops only once with item being 0..5
5454
--> $DIR/single_element_loop.rs:28:17
5555
|
5656
LL | for item in [0..5].into_iter() {

0 commit comments

Comments
 (0)