@@ -50,22 +50,46 @@ LL | let y = x.map(Clone::clone);
50
50
| ^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `x.cloned()`
51
51
52
52
error: you are explicitly cloning with `.map()`
53
- --> $DIR/map_clone.rs:72 :13
53
+ --> $DIR/map_clone.rs:73 :13
54
54
|
55
55
LL | let y = x.map(String::clone);
56
56
| ^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `x.cloned()`
57
57
58
58
error: you are explicitly cloning with `.map()`
59
- --> $DIR/map_clone.rs:78 :13
59
+ --> $DIR/map_clone.rs:79 :13
60
60
|
61
- LL | let y = x.map(|x| String ::clone(x));
62
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned ` method: `x.cloned ()`
61
+ LL | let y = x.map(|x| u32 ::clone(x));
62
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied ` method: `x.copied ()`
63
63
64
64
error: you are explicitly cloning with `.map()`
65
- --> $DIR/map_clone.rs:80:13
65
+ --> $DIR/map_clone.rs:82:13
66
+ |
67
+ LL | let y = x.map(|x| Clone::clone(x));
68
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `x.copied()`
69
+
70
+ error: you are explicitly cloning with `.map()`
71
+ --> $DIR/map_clone.rs:89:13
66
72
|
67
73
LL | let y = x.map(|x| String::clone(x));
68
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `x.cloned()`
69
75
70
- error: aborting due to 11 previous errors
76
+ error: you are explicitly cloning with `.map()`
77
+ --> $DIR/map_clone.rs:92:13
78
+ |
79
+ LL | let y = x.map(|x| Clone::clone(x));
80
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `x.cloned()`
81
+
82
+ error: you are explicitly cloning with `.map()`
83
+ --> $DIR/map_clone.rs:98:13
84
+ |
85
+ LL | let y = x.map(|x| u32::clone(x));
86
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `x.copied()`
87
+
88
+ error: you are explicitly cloning with `.map()`
89
+ --> $DIR/map_clone.rs:101:13
90
+ |
91
+ LL | let y = x.map(|x| Clone::clone(x));
92
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `x.copied()`
93
+
94
+ error: aborting due to 15 previous errors
71
95
0 commit comments