rust/tests/ui/unused_enumerate_index.rs
2023-10-31 17:53:24 +01:00

11 lines
182 B
Rust

// run-rustfix
#![allow(unused)]
#![warn(clippy::unused_enumerate_index)]
fn main() {
let v = [1, 2, 3];
for (_, x) in v.iter().enumerate() {
print!("{x}");
}
}