]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/map_identity.stderr
New upstream version 1.62.1+dfsg1
[rustc.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: unnecessary map of the identity function
37 --> $DIR/map_identity.rs:21:36
38 |
39 LL | let _: Result<u32, u32> = Ok(1).map_err(|a| a);
40 | ^^^^^^^^^^^^^^^ help: remove the call to `map_err`
41
42 error: aborting due to 6 previous errors
43