mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-20 18:13:36 +00:00
23 lines
456 B
Rust
23 lines
456 B
Rust
|
// Tests from for_loop.rs that don't have suggestions
|
||
|
|
||
|
#[warn(
|
||
|
clippy::needless_range_loop,
|
||
|
clippy::explicit_iter_loop,
|
||
|
clippy::explicit_into_iter_loop,
|
||
|
clippy::iter_next_loop,
|
||
|
clippy::for_kv_map
|
||
|
)]
|
||
|
#[allow(
|
||
|
clippy::linkedlist,
|
||
|
clippy::shadow_unrelated,
|
||
|
clippy::unnecessary_mut_passed,
|
||
|
clippy::similar_names,
|
||
|
unused,
|
||
|
dead_code
|
||
|
)]
|
||
|
fn main() {
|
||
|
let vec = vec![1, 2, 3, 4];
|
||
|
|
||
|
for _v in vec.iter().next() {}
|
||
|
}
|