]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/map_identity.stderr
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / map_identity.stderr
1 error: unnecessary map of the identity function
2   --> $DIR/map_identity.rs:8:47
3    |
4 LL |     let _: Vec<_> = x.iter().map(not_identity).map(|x| return x).collect();
5    |                                               ^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
6    |
7    = note: `-D clippy::map-identity` implied by `-D warnings`
8
9 error: unnecessary map of the identity function
10   --> $DIR/map_identity.rs:9:57
11    |
12 LL |     let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
13    |                                                         ^^^^^^^^^^^ help: remove the call to `map`
14
15 error: unnecessary map of the identity function
16   --> $DIR/map_identity.rs:9:29
17    |
18 LL |     let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
19    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
20
21 error: unnecessary map of the identity function
22   --> $DIR/map_identity.rs:10:32
23    |
24 LL |     let _: Option<u8> = Some(3).map(|x| x);
25    |                                ^^^^^^^^^^^ help: remove the call to `map`
26
27 error: unnecessary map of the identity function
28   --> $DIR/map_identity.rs:11:36
29    |
30 LL |       let _: Result<i8, f32> = Ok(-3).map(|x| {
31    |  ____________________________________^
32 LL | |         return x;
33 LL | |     });
34    | |______^ help: remove the call to `map`
35
36 error: aborting due to 5 previous errors
37