summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/needless_range_loop2.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/needless_range_loop2.stderr')
-rw-r--r--src/tools/clippy/tests/ui/needless_range_loop2.stderr15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tools/clippy/tests/ui/needless_range_loop2.stderr b/src/tools/clippy/tests/ui/needless_range_loop2.stderr
index 8c4f5d954..3d1d9e1bf 100644
--- a/src/tools/clippy/tests/ui/needless_range_loop2.stderr
+++ b/src/tools/clippy/tests/ui/needless_range_loop2.stderr
@@ -5,13 +5,14 @@ LL | for i in 3..10 {
| ^^^^^
|
= note: `-D clippy::needless-range-loop` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::needless_range_loop)]`
help: consider using an iterator
|
LL | for <item> in ns.iter().take(10).skip(3) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
error: the loop variable `i` is only used to index `ms`
- --> $DIR/needless_range_loop2.rs:32:14
+ --> $DIR/needless_range_loop2.rs:34:14
|
LL | for i in 0..ms.len() {
| ^^^^^^^^^^^
@@ -22,7 +23,7 @@ LL | for <item> in &mut ms {
| ~~~~~~ ~~~~~~~
error: the loop variable `i` is only used to index `ms`
- --> $DIR/needless_range_loop2.rs:38:14
+ --> $DIR/needless_range_loop2.rs:41:14
|
LL | for i in 0..ms.len() {
| ^^^^^^^^^^^
@@ -33,7 +34,7 @@ LL | for <item> in &mut ms {
| ~~~~~~ ~~~~~~~
error: the loop variable `i` is only used to index `vec`
- --> $DIR/needless_range_loop2.rs:62:14
+ --> $DIR/needless_range_loop2.rs:66:14
|
LL | for i in x..x + 4 {
| ^^^^^^^^
@@ -44,7 +45,7 @@ LL | for <item> in vec.iter_mut().skip(x).take(4) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: the loop variable `i` is only used to index `vec`
- --> $DIR/needless_range_loop2.rs:69:14
+ --> $DIR/needless_range_loop2.rs:74:14
|
LL | for i in x..=x + 4 {
| ^^^^^^^^^
@@ -55,7 +56,7 @@ LL | for <item> in vec.iter_mut().skip(x).take(4 + 1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: the loop variable `i` is only used to index `arr`
- --> $DIR/needless_range_loop2.rs:75:14
+ --> $DIR/needless_range_loop2.rs:81:14
|
LL | for i in 0..3 {
| ^^^^
@@ -66,7 +67,7 @@ LL | for <item> in &arr {
| ~~~~~~ ~~~~
error: the loop variable `i` is only used to index `arr`
- --> $DIR/needless_range_loop2.rs:79:14
+ --> $DIR/needless_range_loop2.rs:86:14
|
LL | for i in 0..2 {
| ^^^^
@@ -77,7 +78,7 @@ LL | for <item> in arr.iter().take(2) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~
error: the loop variable `i` is only used to index `arr`
- --> $DIR/needless_range_loop2.rs:83:14
+ --> $DIR/needless_range_loop2.rs:91:14
|
LL | for i in 1..3 {
| ^^^^