1 error: you are using an explicit closure for copying elements
2 --> $DIR/map_clone.rs:11:22
4 LL | let _: Vec<i8> = vec![5_i8; 6].iter().map(|x| *x).collect();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `vec![5_i8; 6].iter().copied()`
7 = note: `-D clippy::map-clone` implied by `-D warnings`
9 error: you are using an explicit closure for cloning elements
10 --> $DIR/map_clone.rs:12:26
12 LL | let _: Vec<String> = vec![String::new()].iter().map(|x| x.clone()).collect();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `vec![String::new()].iter().cloned()`
15 error: you are using an explicit closure for copying elements
16 --> $DIR/map_clone.rs:13:23
18 LL | let _: Vec<u32> = vec![42, 43].iter().map(|&x| x).collect();
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `vec![42, 43].iter().copied()`
21 error: you are using an explicit closure for copying elements
22 --> $DIR/map_clone.rs:15:26
24 LL | let _: Option<u64> = Some(&16).map(|b| *b);
25 | ^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `Some(&16).copied()`
27 error: you are using an explicit closure for copying elements
28 --> $DIR/map_clone.rs:16:25
30 LL | let _: Option<u8> = Some(&1).map(|x| x.clone());
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `Some(&1).copied()`
33 error: you are needlessly cloning iterator elements
34 --> $DIR/map_clone.rs:27:29
36 LL | let _ = std::env::args().map(|v| v.clone());
37 | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call
39 error: aborting due to 6 previous errors