From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/clippy/tests/ui/methods_fixable.fixed | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/tools/clippy/tests/ui/methods_fixable.fixed (limited to '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 index 000000000..ee7c1b0da --- /dev/null +++ b/src/tools/clippy/tests/ui/methods_fixable.fixed @@ -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); +} -- cgit v1.2.3