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.stderr | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/tools/clippy/tests/ui/methods.stderr (limited to 'src/tools/clippy/tests/ui/methods.stderr') diff --git a/src/tools/clippy/tests/ui/methods.stderr b/src/tools/clippy/tests/ui/methods.stderr new file mode 100644 index 000000000..b63672dd6 --- /dev/null +++ b/src/tools/clippy/tests/ui/methods.stderr @@ -0,0 +1,24 @@ +error: methods called `new` usually return `Self` + --> $DIR/methods.rs:104:5 + | +LL | / fn new() -> i32 { +LL | | 0 +LL | | } + | |_____^ + | + = note: `-D clippy::new-ret-no-self` implied by `-D warnings` + +error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead + --> $DIR/methods.rs:125:13 + | +LL | let _ = v.iter().filter(|&x| { + | _____________^ +LL | | *x < 0 +LL | | } +LL | | ).next(); + | |___________________________^ + | + = note: `-D clippy::filter-next` implied by `-D warnings` + +error: aborting due to 2 previous errors + -- cgit v1.2.3