From 32405b8d46ae816c2641953664420a8ddd302fbf Mon Sep 17 00:00:00 2001 From: nahuakang Date: Sun, 17 Jan 2021 20:36:36 +0100 Subject: [PATCH] Add stderr for lint again --- tests/ui/inspect_then_for_each.stderr | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/ui/inspect_then_for_each.stderr diff --git a/tests/ui/inspect_then_for_each.stderr b/tests/ui/inspect_then_for_each.stderr new file mode 100644 index 000000000000..038f89e271e0 --- /dev/null +++ b/tests/ui/inspect_then_for_each.stderr @@ -0,0 +1,16 @@ +error: called `inspect(..).for_each(..)` on an `Iterator` + --> $DIR/inspect_then_for_each.rs:7:19 + | +LL | a.into_iter().inspect(|x| assert!(*x > 0)).for_each(|x| { + | ___________________^ +LL | | let y = do_some(x); +LL | | let z = do_more(y); +LL | | b.push(z); +LL | | }); + | |______^ + | + = note: `-D clippy::inspect-then-for-each` implied by `-D warnings` + = help: move the code from `inspect(..)` to `for_each(..)` and remove the `inspect(..)` + +error: aborting due to previous error +