about summary refs log tree commit diff
diff options
context:
space:
mode:
authorShotaro Yamada <sinkuu@sinkuu.xyz>2019-01-06 15:33:42 +0900
committerShotaro Yamada <sinkuu@sinkuu.xyz>2019-01-06 15:33:42 +0900
commitf67124245cc24babd0345347a77089ba698acd14 (patch)
treee178aee9e23acf54f5085e68eee28586a646caa3
parentddff2ed649340fc07d3f6a3357c85b61d4b22b5f (diff)
downloadrust-f67124245cc24babd0345347a77089ba698acd14.tar.gz
rust-f67124245cc24babd0345347a77089ba698acd14.zip
Derive Clone for ArgumentV1
manual impl was a workaround for #28229.
-rw-r--r--src/libcore/fmt/mod.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index bb6f511acf7..0127277d9cf 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -247,7 +247,7 @@ struct Void {
 /// family of functions. It contains a function to format the given value. At
 /// compile time it is ensured that the function and the value have the correct
 /// types, and then this struct is used to canonicalize arguments to one type.
-#[derive(Copy)]
+#[derive(Copy, Clone)]
 #[allow(missing_debug_implementations)]
 #[unstable(feature = "fmt_internals", reason = "internal to format_args!",
            issue = "0")]
@@ -257,14 +257,6 @@ pub struct ArgumentV1<'a> {
     formatter: fn(&Void, &mut Formatter) -> Result,
 }
 
-#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
-           issue = "0")]
-impl Clone for ArgumentV1<'_> {
-    fn clone(&self) -> Self {
-        *self
-    }
-}
-
 impl<'a> ArgumentV1<'a> {
     #[inline(never)]
     fn show_usize(x: &usize, f: &mut Formatter) -> Result {