1 error: `Iterator::map` call that discard the iterator's values
2 --> $DIR/issue-109152.rs:5:21
4 LL | vec![42].iter().map(drop);
7 | | this function returns `()`, which is likely not what you wanted
8 | | called `Iterator::map` with callable that returns `()`
9 | after this call to map, the resulting iterator is `impl Iterator<Item = ()>`, which means the only information carried by the iterator is the number of items
11 = note: `Iterator::map`, like many of the methods on `Iterator`, gets executed lazily, meaning that its effects won't be visible until it is iterated
12 note: the lint level is defined here
13 --> $DIR/issue-109152.rs:1:9
15 LL | #![deny(map_unit_fn)]
17 help: you might have meant to use `Iterator::for_each`
19 LL | vec![42].iter().for_each(drop);
22 error: aborting due to 1 previous error