]> git.lizzy.rs Git - rust.git/blob - tests/ui/redundant_clone.stderr
iterate List by value
[rust.git] / tests / ui / redundant_clone.stderr
1 error: redundant clone
2   --> $DIR/redundant_clone.rs:8:42
3    |
4 LL |     let _s = ["lorem", "ipsum"].join(" ").to_string();
5    |                                          ^^^^^^^^^^^^ help: remove this
6    |
7    = note: `-D clippy::redundant-clone` implied by `-D warnings`
8 note: this value is dropped without further use
9   --> $DIR/redundant_clone.rs:8:14
10    |
11 LL |     let _s = ["lorem", "ipsum"].join(" ").to_string();
12    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error: redundant clone
15   --> $DIR/redundant_clone.rs:11:15
16    |
17 LL |     let _s = s.clone();
18    |               ^^^^^^^^ help: remove this
19    |
20 note: this value is dropped without further use
21   --> $DIR/redundant_clone.rs:11:14
22    |
23 LL |     let _s = s.clone();
24    |              ^
25
26 error: redundant clone
27   --> $DIR/redundant_clone.rs:14:15
28    |
29 LL |     let _s = s.to_string();
30    |               ^^^^^^^^^^^^ help: remove this
31    |
32 note: this value is dropped without further use
33   --> $DIR/redundant_clone.rs:14:14
34    |
35 LL |     let _s = s.to_string();
36    |              ^
37
38 error: redundant clone
39   --> $DIR/redundant_clone.rs:17:15
40    |
41 LL |     let _s = s.to_owned();
42    |               ^^^^^^^^^^^ help: remove this
43    |
44 note: this value is dropped without further use
45   --> $DIR/redundant_clone.rs:17:14
46    |
47 LL |     let _s = s.to_owned();
48    |              ^
49
50 error: redundant clone
51   --> $DIR/redundant_clone.rs:19:42
52    |
53 LL |     let _s = Path::new("/a/b/").join("c").to_owned();
54    |                                          ^^^^^^^^^^^ help: remove this
55    |
56 note: this value is dropped without further use
57   --> $DIR/redundant_clone.rs:19:14
58    |
59 LL |     let _s = Path::new("/a/b/").join("c").to_owned();
60    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
62 error: redundant clone
63   --> $DIR/redundant_clone.rs:21:42
64    |
65 LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
66    |                                          ^^^^^^^^^^^^^^ help: remove this
67    |
68 note: this value is dropped without further use
69   --> $DIR/redundant_clone.rs:21:14
70    |
71 LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
72    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74 error: redundant clone
75   --> $DIR/redundant_clone.rs:23:29
76    |
77 LL |     let _s = OsString::new().to_owned();
78    |                             ^^^^^^^^^^^ help: remove this
79    |
80 note: this value is dropped without further use
81   --> $DIR/redundant_clone.rs:23:14
82    |
83 LL |     let _s = OsString::new().to_owned();
84    |              ^^^^^^^^^^^^^^^
85
86 error: redundant clone
87   --> $DIR/redundant_clone.rs:25:29
88    |
89 LL |     let _s = OsString::new().to_os_string();
90    |                             ^^^^^^^^^^^^^^^ help: remove this
91    |
92 note: this value is dropped without further use
93   --> $DIR/redundant_clone.rs:25:14
94    |
95 LL |     let _s = OsString::new().to_os_string();
96    |              ^^^^^^^^^^^^^^^
97
98 error: redundant clone
99   --> $DIR/redundant_clone.rs:32:19
100    |
101 LL |     let _t = tup.0.clone();
102    |                   ^^^^^^^^ help: remove this
103    |
104 note: this value is dropped without further use
105   --> $DIR/redundant_clone.rs:32:14
106    |
107 LL |     let _t = tup.0.clone();
108    |              ^^^^^
109
110 error: redundant clone
111   --> $DIR/redundant_clone.rs:61:22
112    |
113 LL |         (a.clone(), a.clone())
114    |                      ^^^^^^^^ help: remove this
115    |
116 note: this value is dropped without further use
117   --> $DIR/redundant_clone.rs:61:21
118    |
119 LL |         (a.clone(), a.clone())
120    |                     ^
121
122 error: redundant clone
123   --> $DIR/redundant_clone.rs:121:15
124    |
125 LL |     let _s = s.clone();
126    |               ^^^^^^^^ help: remove this
127    |
128 note: this value is dropped without further use
129   --> $DIR/redundant_clone.rs:121:14
130    |
131 LL |     let _s = s.clone();
132    |              ^
133
134 error: redundant clone
135   --> $DIR/redundant_clone.rs:122:15
136    |
137 LL |     let _t = t.clone();
138    |               ^^^^^^^^ help: remove this
139    |
140 note: this value is dropped without further use
141   --> $DIR/redundant_clone.rs:122:14
142    |
143 LL |     let _t = t.clone();
144    |              ^
145
146 error: redundant clone
147   --> $DIR/redundant_clone.rs:132:19
148    |
149 LL |         let _f = f.clone();
150    |                   ^^^^^^^^ help: remove this
151    |
152 note: this value is dropped without further use
153   --> $DIR/redundant_clone.rs:132:18
154    |
155 LL |         let _f = f.clone();
156    |                  ^
157
158 error: redundant clone
159   --> $DIR/redundant_clone.rs:144:14
160    |
161 LL |     let y = x.clone().join("matthias");
162    |              ^^^^^^^^ help: remove this
163    |
164 note: cloned value is neither consumed nor mutated
165   --> $DIR/redundant_clone.rs:144:13
166    |
167 LL |     let y = x.clone().join("matthias");
168    |             ^^^^^^^^^
169
170 error: aborting due to 14 previous errors
171