Skip to content

Commit

Permalink
Add stderr for lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuakang committed Jan 17, 2021
1 parent e8e312a commit 32405b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/ui/inspect_then_for_each.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 32405b8

Please sign in to comment.