fix: 7125 lint message should start with a small letter
This commit is contained in:
parent
2512341fe4
commit
bce869f0c0
@ -95,7 +95,7 @@ pub(super) fn check<'tcx>(
|
|||||||
cx,
|
cx,
|
||||||
SINGLE_ELEMENT_LOOP,
|
SINGLE_ELEMENT_LOOP,
|
||||||
arg.span,
|
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?",
|
"did you mean to iterate over the range instead?",
|
||||||
sugg.to_string(),
|
sugg.to_string(),
|
||||||
Applicability::Unspecified,
|
Applicability::Unspecified,
|
||||||
|
@ -32,25 +32,25 @@ LL + dbg!(item);
|
|||||||
LL + }
|
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
|
--> $DIR/single_element_loop.rs:16:17
|
||||||
|
|
|
|
||||||
LL | for item in &[0..5] {
|
LL | for item in &[0..5] {
|
||||||
| ^^^^^^^ help: did you mean to iterate over the range instead?: `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
|
--> $DIR/single_element_loop.rs:20:17
|
||||||
|
|
|
|
||||||
LL | for item in [0..5].iter_mut() {
|
LL | for item in [0..5].iter_mut() {
|
||||||
| ^^^^^^^^^^^^^^^^^ help: did you mean to iterate over the range instead?: `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:24:17
|
--> $DIR/single_element_loop.rs:24:17
|
||||||
|
|
|
|
||||||
LL | for item in [0..5] {
|
LL | for item in [0..5] {
|
||||||
| ^^^^^^ help: did you mean to iterate over the range instead?: `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
|
--> $DIR/single_element_loop.rs:28:17
|
||||||
|
|
|
|
||||||
LL | for item in [0..5].into_iter() {
|
LL | for item in [0..5].into_iter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user