]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/for_loop_fixable.stderr
Ignore associated items in trait *implementations* when considering type complexity
[rust.git] / tests / ui / for_loop_fixable.stderr
index 7454f40f3e2d1461486ce6538f60e3948d42a2b1..009dbe1a0bfaf49f2a967696b471e5e4b541475e 100644 (file)
@@ -1,61 +1,5 @@
-error: this range is empty so this for loop will never run
-  --> $DIR/for_loop_fixable.rs:39:14
-   |
-LL |     for i in 10..0 {
-   |              ^^^^^
-   |
-   = note: `-D clippy::reverse-range-loop` implied by `-D warnings`
-help: consider using the following if you are attempting to iterate over this range in reverse
-   |
-LL |     for i in (0..10).rev() {
-   |              ^^^^^^^^^^^^^
-
-error: this range is empty so this for loop will never run
-  --> $DIR/for_loop_fixable.rs:43:14
-   |
-LL |     for i in 10..=0 {
-   |              ^^^^^^
-   |
-help: consider using the following if you are attempting to iterate over this range in reverse
-   |
-LL |     for i in (0..=10).rev() {
-   |              ^^^^^^^^^^^^^^
-
-error: this range is empty so this for loop will never run
-  --> $DIR/for_loop_fixable.rs:47:14
-   |
-LL |     for i in MAX_LEN..0 {
-   |              ^^^^^^^^^^
-   |
-help: consider using the following if you are attempting to iterate over this range in reverse
-   |
-LL |     for i in (0..MAX_LEN).rev() {
-   |              ^^^^^^^^^^^^^^^^^^
-
-error: this range is empty so this for loop will never run
-  --> $DIR/for_loop_fixable.rs:72:14
-   |
-LL |     for i in 10..5 + 4 {
-   |              ^^^^^^^^^
-   |
-help: consider using the following if you are attempting to iterate over this range in reverse
-   |
-LL |     for i in (5 + 4..10).rev() {
-   |              ^^^^^^^^^^^^^^^^^
-
-error: this range is empty so this for loop will never run
-  --> $DIR/for_loop_fixable.rs:76:14
-   |
-LL |     for i in (5 + 2)..(3 - 1) {
-   |              ^^^^^^^^^^^^^^^^
-   |
-help: consider using the following if you are attempting to iterate over this range in reverse
-   |
-LL |     for i in ((3 - 1)..(5 + 2)).rev() {
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^
-
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:98:15
+  --> $DIR/for_loop_fixable.rs:38:15
    |
 LL |     for _v in vec.iter() {}
    |               ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
@@ -63,13 +7,13 @@ LL |     for _v in vec.iter() {}
    = note: `-D clippy::explicit-iter-loop` implied by `-D warnings`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:100:15
+  --> $DIR/for_loop_fixable.rs:40:15
    |
 LL |     for _v in vec.iter_mut() {}
    |               ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
 
-error: it is more concise to loop over containers instead of using explicit iteration methods`
-  --> $DIR/for_loop_fixable.rs:103:15
+error: it is more concise to loop over containers instead of using explicit iteration methods
+  --> $DIR/for_loop_fixable.rs:43:15
    |
 LL |     for _v in out_vec.into_iter() {}
    |               ^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `out_vec`
@@ -77,64 +21,76 @@ LL |     for _v in out_vec.into_iter() {}
    = note: `-D clippy::explicit-into-iter-loop` implied by `-D warnings`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:106:15
-   |
-LL |     for _v in array.into_iter() {}
-   |               ^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&array`
-
-error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:111:15
+  --> $DIR/for_loop_fixable.rs:48:15
    |
 LL |     for _v in [1, 2, 3].iter() {}
    |               ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[1, 2, 3]`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:115:15
+  --> $DIR/for_loop_fixable.rs:52:15
    |
 LL |     for _v in [0; 32].iter() {}
    |               ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 32]`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:120:15
+  --> $DIR/for_loop_fixable.rs:57:15
    |
 LL |     for _v in ll.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&ll`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:123:15
+  --> $DIR/for_loop_fixable.rs:60:15
    |
 LL |     for _v in vd.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&vd`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:126:15
+  --> $DIR/for_loop_fixable.rs:63:15
    |
 LL |     for _v in bh.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&bh`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:129:15
+  --> $DIR/for_loop_fixable.rs:66:15
    |
 LL |     for _v in hm.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&hm`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:132:15
+  --> $DIR/for_loop_fixable.rs:69:15
    |
 LL |     for _v in bt.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&bt`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:135:15
+  --> $DIR/for_loop_fixable.rs:72:15
    |
 LL |     for _v in hs.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&hs`
 
 error: it is more concise to loop over references to containers instead of using explicit iteration methods
-  --> $DIR/for_loop_fixable.rs:138:15
+  --> $DIR/for_loop_fixable.rs:75:15
    |
 LL |     for _v in bs.iter() {}
    |               ^^^^^^^^^ help: to write this more concisely, try: `&bs`
 
-error: aborting due to 18 previous errors
+error: it is more concise to loop over containers instead of using explicit iteration methods
+  --> $DIR/for_loop_fixable.rs:250:18
+   |
+LL |         for i in iterator.into_iter() {
+   |                  ^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `iterator`
+
+error: it is more concise to loop over references to containers instead of using explicit iteration methods
+  --> $DIR/for_loop_fixable.rs:270:18
+   |
+LL |         for _ in t.into_iter() {}
+   |                  ^^^^^^^^^^^^^ help: to write this more concisely, try: `&t`
+
+error: it is more concise to loop over containers instead of using explicit iteration methods
+  --> $DIR/for_loop_fixable.rs:272:18
+   |
+LL |         for _ in r.into_iter() {}
+   |                  ^^^^^^^^^^^^^ help: to write this more concisely, try: `r`
+
+error: aborting due to 15 previous errors