diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs index 85b09ee06f1fd..f2fa6fd0ca3e9 100644 --- a/library/core/src/clone.rs +++ b/library/core/src/clone.rs @@ -680,7 +680,7 @@ mod impls { #[inline(always)] #[rustc_diagnostic_item = "noop_method_clone"] fn clone(&self) -> Self { - self + *self } } diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 57416455e9de8..43300cc843c6d 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -849,7 +849,7 @@ impl Copy for PhantomData {} #[stable(feature = "rust1", since = "1.0.0")] impl Clone for PhantomData { fn clone(&self) -> Self { - Self + *self } }