]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/inspect_for_each.stderr
Rollup merge of #81526 - ojeda:btree-use-unwrap_unchecked, r=scottmcm
[rust.git] / src / tools / clippy / tests / ui / inspect_for_each.stderr
1 error: called `inspect(..).for_each(..)` on an `Iterator`
2   --> $DIR/inspect_for_each.rs:7:19
3    |
4 LL |       a.into_iter().inspect(|x| assert!(*x > 0)).for_each(|x| {
5    |  ___________________^
6 LL | |         let y = do_some(x);
7 LL | |         let z = do_more(y);
8 LL | |         b.push(z);
9 LL | |     });
10    | |______^
11    |
12    = note: `-D clippy::inspect-for-each` implied by `-D warnings`
13    = help: move the code from `inspect(..)` to `for_each(..)` and remove the `inspect(..)`
14
15 error: aborting due to previous error
16