]> git.lizzy.rs Git - rust.git/blob - tests/ui/flat_map_identity.stderr
Fix adjacent code
[rust.git] / tests / ui / flat_map_identity.stderr
1 error: use of `flat_map` with an identity function
2   --> $DIR/flat_map_identity.rs:10:22
3    |
4 LL |     let _ = iterator.flat_map(|x| x);
5    |                      ^^^^^^^^^^^^^^^ help: try: `flatten()`
6    |
7    = note: `-D clippy::flat-map-identity` implied by `-D warnings`
8
9 error: use of `flat_map` with an identity function
10   --> $DIR/flat_map_identity.rs:13:22
11    |
12 LL |     let _ = iterator.flat_map(convert::identity);
13    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`
14
15 error: use of `flat_map` with an identity function
16   --> $DIR/flat_map_identity.rs:16:22
17    |
18 LL |     let _ = iterator.flat_map(|x| return x);
19    |                      ^^^^^^^^^^^^^^^^^^^^^^ help: try: `flatten()`
20
21 error: aborting due to 3 previous errors
22