]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/methods_fixable.rs
Auto merge of #99963 - cjgillot:iter-submodule, r=compiler-errors
[rust.git] / src / tools / clippy / tests / ui / methods_fixable.rs
1 // run-rustfix
2
3 #![warn(clippy::filter_next)]
4
5 /// Checks implementation of `FILTER_NEXT` lint.
6 fn main() {
7     let v = vec![3, 2, 1, 0, -1, -2, -3];
8
9     // Single-line case.
10     let _ = v.iter().filter(|&x| *x < 0).next();
11 }