Skip to content

Commit f671242

Browse files
committed
Derive Clone for ArgumentV1
manual impl was a workaround for rust-lang#28229.
1 parent ddff2ed commit f671242

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/libcore/fmt/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ struct Void {
247247
/// family of functions. It contains a function to format the given value. At
248248
/// compile time it is ensured that the function and the value have the correct
249249
/// types, and then this struct is used to canonicalize arguments to one type.
250-
#[derive(Copy)]
250+
#[derive(Copy, Clone)]
251251
#[allow(missing_debug_implementations)]
252252
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
253253
issue = "0")]
@@ -257,14 +257,6 @@ pub struct ArgumentV1<'a> {
257257
formatter: fn(&Void, &mut Formatter) -> Result,
258258
}
259259

260-
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
261-
issue = "0")]
262-
impl Clone for ArgumentV1<'_> {
263-
fn clone(&self) -> Self {
264-
*self
265-
}
266-
}
267-
268260
impl<'a> ArgumentV1<'a> {
269261
#[inline(never)]
270262
fn show_usize(x: &usize, f: &mut Formatter) -> Result {

0 commit comments

Comments
 (0)