mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
12 lines
218 B
Rust
12 lines
218 B
Rust
|
// run-rustfix
|
||
|
|
||
|
#![warn(clippy::filter_next)]
|
||
|
|
||
|
/// Checks implementation of `FILTER_NEXT` lint.
|
||
|
fn main() {
|
||
|
let v = vec![3, 2, 1, 0, -1, -2, -3];
|
||
|
|
||
|
// Single-line case.
|
||
|
let _ = v.iter().find(|&x| *x < 0);
|
||
|
}
|