Skip to content

Commit

Permalink
Derive Clone for ArgumentV1
Browse files Browse the repository at this point in the history
manual impl was a workaround for #28229.
  • Loading branch information
sinkuu committed Jan 6, 2019
1 parent ddff2ed commit f671242
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/libcore/fmt/mod.rs
Expand Up @@ -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")]
Expand All @@ -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 {
Expand Down

0 comments on commit f671242

Please sign in to comment.