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

error: redundant clone
  --> $DIR/redundant_clone.rs:13:15
   |
LL |     let _s = s.clone();
   |               ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:13:14
   |
LL |     let _s = s.clone();
   |              ^

error: redundant clone
  --> $DIR/redundant_clone.rs:16:15
   |
LL |     let _s = s.to_string();
   |               ^^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:16:14
   |
LL |     let _s = s.to_string();
   |              ^

error: redundant clone
  --> $DIR/redundant_clone.rs:19:15
   |
LL |     let _s = s.to_owned();
   |               ^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:19:14
   |
LL |     let _s = s.to_owned();
   |              ^

error: redundant clone
  --> $DIR/redundant_clone.rs:21:42
   |
LL |     let _s = Path::new("/a/b/").join("c").to_owned();
   |                                          ^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:21:14
   |
LL |     let _s = Path::new("/a/b/").join("c").to_owned();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:23:42
   |
LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
   |                                          ^^^^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:23:14
   |
LL |     let _s = Path::new("/a/b/").join("c").to_path_buf();
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:25:29
   |
LL |     let _s = OsString::new().to_owned();
   |                             ^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:25:14
   |
LL |     let _s = OsString::new().to_owned();
   |              ^^^^^^^^^^^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:27:29
   |
LL |     let _s = OsString::new().to_os_string();
   |                             ^^^^^^^^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:27:14
   |
LL |     let _s = OsString::new().to_os_string();
   |              ^^^^^^^^^^^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:38:19
   |
LL |     let _t = tup.0.clone();
   |                   ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:38:14
   |
LL |     let _t = tup.0.clone();
   |              ^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:70:25
   |
LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
   |                         ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:70:24
   |
LL |     if b { (a.clone(), a.clone()) } else { (Alpha, a) }
   |                        ^

error: redundant clone
  --> $DIR/redundant_clone.rs:127:15
   |
LL |     let _s = s.clone();
   |               ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:127:14
   |
LL |     let _s = s.clone();
   |              ^

error: redundant clone
  --> $DIR/redundant_clone.rs:128:15
   |
LL |     let _t = t.clone();
   |               ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:128:14
   |
LL |     let _t = t.clone();
   |              ^

error: redundant clone
  --> $DIR/redundant_clone.rs:138:19
   |
LL |         let _f = f.clone();
   |                   ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:138:18
   |
LL |         let _f = f.clone();
   |                  ^

error: redundant clone
  --> $DIR/redundant_clone.rs:150:14
   |
LL |     let y = x.clone().join("matthias");
   |              ^^^^^^^^ help: remove this
   |
note: cloned value is neither consumed nor mutated
  --> $DIR/redundant_clone.rs:150:13
   |
LL |     let y = x.clone().join("matthias");
   |             ^^^^^^^^^

error: redundant clone
  --> $DIR/redundant_clone.rs:204:11
   |
LL |     foo(&x.clone(), move || {
   |           ^^^^^^^^ help: remove this
   |
note: this value is dropped without further use
  --> $DIR/redundant_clone.rs:204:10
   |
LL |     foo(&x.clone(), move || {
   |          ^

error: aborting due to 15 previous errors