2023-02-25 19:18:08 -06:00
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
2024-03-07 11:50:47 -06:00
|
|
|
--> tests/ui/unused_enumerate_index.rs:12:19
|
2023-02-25 19:18:08 -06:00
|
|
|
|
|
|
|
|
LL | for (_, x) in v.iter().enumerate() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::unused-enumerate-index` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unused_enumerate_index)]`
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL | for x in v.iter() {
|
|
|
|
| ~ ~~~~~~~~
|
|
|
|
|
2023-10-12 12:05:22 -05:00
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
2024-03-07 11:50:47 -06:00
|
|
|
--> tests/ui/unused_enumerate_index.rs:59:19
|
2023-10-12 12:05:22 -05:00
|
|
|
|
|
|
|
|
LL | for (_, x) in dummy.enumerate() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL | for x in dummy {
|
|
|
|
| ~ ~~~~~
|
|
|
|
|
2024-03-07 11:50:47 -06:00
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:63:39
|
|
|
|
|
|
|
|
|
LL | let _ = vec![1, 2, 3].into_iter().enumerate().map(|(_, x)| println!("{x}"));
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL - let _ = vec![1, 2, 3].into_iter().enumerate().map(|(_, x)| println!("{x}"));
|
|
|
|
LL + let _ = vec![1, 2, 3].into_iter().map(|x| println!("{x}"));
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:65:39
|
|
|
|
|
|
|
|
|
LL | let p = vec![1, 2, 3].into_iter().enumerate();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL ~ let p = vec![1, 2, 3].into_iter();
|
|
|
|
LL ~ p.map(|x| println!("{x}"));
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:86:17
|
|
|
|
|
|
|
|
|
LL | _ = mac2!().enumerate().map(|(_, _v)| {});
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL - _ = mac2!().enumerate().map(|(_, _v)| {});
|
|
|
|
LL + _ = mac2!().map(|_v| {});
|
|
|
|
|
|
|
|
|
|
2024-03-13 14:28:57 -05:00
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:94:39
|
|
|
|
|
|
|
|
|
LL | let v = [1, 2, 3].iter().copied().enumerate();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL ~ let v = [1, 2, 3].iter().copied();
|
|
|
|
LL ~ let x = v.map(|x: i32| x).sum::<i32>();
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:99:39
|
|
|
|
|
|
|
|
|
LL | let v = [1, 2, 3].iter().copied().enumerate();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL ~ let v = [1, 2, 3].iter().copied();
|
|
|
|
LL ~ let x = v.map(|x: i32| x).sum::<i32>();
|
|
|
|
|
|
|
|
|
|
|
|
|
error: you seem to use `.enumerate()` and immediately discard the index
|
|
|
|
--> tests/ui/unused_enumerate_index.rs:103:39
|
|
|
|
|
|
|
|
|
LL | let v = [1, 2, 3].iter().copied().enumerate();
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: remove the `.enumerate()` call
|
|
|
|
|
|
|
|
|
LL ~ let v = [1, 2, 3].iter().copied();
|
|
|
|
LL ~ let x = v.map(|x| x).sum::<i32>();
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2023-02-25 19:18:08 -06:00
|
|
|
|