]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/methods_fixable.fixed
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / methods_fixable.fixed
diff --git a/src/tools/clippy/tests/ui/methods_fixable.fixed b/src/tools/clippy/tests/ui/methods_fixable.fixed
new file mode 100644 (file)
index 0000000..ee7c1b0
--- /dev/null
@@ -0,0 +1,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().find(|&x| *x < 0);
+}