summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/methods_fixable.rs
blob: 3a976d235276aeb93267da435b1781124483b3fd (plain)
1
2
3
4
5
6
7
8
9
10
11
//@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().filter(|&x| *x < 0).next();
}