2023-07-02 12:35:19 +00:00
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:18:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in vec.iter() {}
|
|
|
|
| ^^^^^^^^^^ help: to write this more concisely, try: `&vec`
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:1:9
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::explicit_iter_loop)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:19:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in vec.iter_mut() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut vec`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:22:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in rvec.iter() {}
|
|
|
|
| ^^^^^^^^^^^ help: to write this more concisely, try: `rvec`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:31:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:35:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:36:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in [0; 33].iter() {}
|
|
|
|
| ^^^^^^^^^^^^^^ help: to write this more concisely, try: `&[0; 33]`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:39:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:41:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in rll.iter() {}
|
|
|
|
| ^^^^^^^^^^ help: to write this more concisely, try: `rll`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:44:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:46:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in rvd.iter() {}
|
|
|
|
| ^^^^^^^^^^ help: to write this more concisely, try: `rvd`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:49:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:52:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:55:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:58:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ 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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:61:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in bs.iter() {}
|
|
|
|
| ^^^^^^^^^ help: to write this more concisely, try: `&bs`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:150:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in x.iter() {}
|
|
|
|
| ^^^^^^^^ help: to write this more concisely, try: `&x`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:151:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in x.iter_mut() {}
|
|
|
|
| ^^^^^^^^^^^^ help: to write this more concisely, try: `&mut x`
|
|
|
|
|
|
|
|
error: it is more concise to loop over references to containers instead of using explicit iteration methods
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/explicit_iter_loop.rs:154:14
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
LL | for _ in r.iter() {}
|
|
|
|
| ^^^^^^^^ help: to write this more concisely, try: `r`
|
|
|
|
|
2023-09-12 16:13:53 +00:00
|
|
|
error: aborting due to 18 previous errors
|
2023-07-02 12:35:19 +00:00
|
|
|
|