]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/redundant_clone.stderr
Merge commit '0cb0f7636851f9fcc57085cf80197a2ef6db098f' into clippyup
[rust.git] / src / tools / clippy / tests / ui / redundant_clone.stderr
1 error: redundant clone
2   --> $DIR/redundant_clone.rs:10: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:10:14
10    |
11 LL |     let _s = ["lorem", "ipsum"].join(" ").to_string();
12    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error: redundant clone
15   --> $DIR/redundant_clone.rs:13: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:13:14
22    |
23 LL |     let _s = s.clone();
24    |              ^
25
26 error: redundant clone
27   --> $DIR/redundant_clone.rs:16: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:16:14
34    |
35 LL |     let _s = s.to_string();
36    |              ^
37
38 error: redundant clone
39   --> $DIR/redundant_clone.rs:19: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:19:14
46    |
47 LL |     let _s = s.to_owned();
48    |              ^
49
50 error: redundant clone
51   --> $DIR/redundant_clone.rs:21: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:21: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:23: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:23: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:25: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:25:14
82    |
83 LL |     let _s = OsString::new().to_owned();
84    |              ^^^^^^^^^^^^^^^
85
86 error: redundant clone
87   --> $DIR/redundant_clone.rs:27: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:27:14
94    |
95 LL |     let _s = OsString::new().to_os_string();
96    |              ^^^^^^^^^^^^^^^
97
98 error: redundant clone
99   --> $DIR/redundant_clone.rs:38: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:38:14
106    |
107 LL |     let _t = tup.0.clone();
108    |              ^^^^^
109
110 error: redundant clone
111   --> $DIR/redundant_clone.rs:70:25
112    |
113 LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
114    |                         ^^^^^^^^ help: remove this
115    |
116 note: this value is dropped without further use
117   --> $DIR/redundant_clone.rs:70:24
118    |
119 LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
120    |                        ^
121
122 error: redundant clone
123   --> $DIR/redundant_clone.rs:127: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:127:14
130    |
131 LL |     let _s = s.clone();
132    |              ^
133
134 error: redundant clone
135   --> $DIR/redundant_clone.rs:128: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:128:14
142    |
143 LL |     let _t = t.clone();
144    |              ^
145
146 error: redundant clone
147   --> $DIR/redundant_clone.rs:138: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:138:18
154    |
155 LL |         let _f = f.clone();
156    |                  ^
157
158 error: redundant clone
159   --> $DIR/redundant_clone.rs:150: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:150:13
166    |
167 LL |     let y = x.clone().join("matthias");
168    |             ^^^^^^^^^
169
170 error: redundant clone
171   --> $DIR/redundant_clone.rs:204:11
172    |
173 LL |     foo(&x.clone(), move || {
174    |           ^^^^^^^^ help: remove this
175    |
176 note: this value is dropped without further use
177   --> $DIR/redundant_clone.rs:204:10
178    |
179 LL |     foo(&x.clone(), move || {
180    |          ^
181
182 error: aborting due to 15 previous errors
183