From c4edd0c8dfa51bf0466b88271e108705738e2c47 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 26 Mar 2015 16:41:13 -0400 Subject: [PATCH] Make the trait Copy extend Clone. --- src/libcore/marker.rs | 2 +- src/librustc_typeck/check/wf.rs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index f755c912fcd4..9503e439a8e8 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -154,7 +154,7 @@ pub trait Sized : MarkerTrait { /// change: that second example would fail to compile if we made `Foo` non-`Copy`. #[stable(feature = "rust1", since = "1.0.0")] #[lang="copy"] -pub trait Copy : MarkerTrait { +pub trait Copy : Clone { // Empty. } diff --git a/src/librustc_typeck/check/wf.rs b/src/librustc_typeck/check/wf.rs index 23e31df53952..a86e2b17c93b 100644 --- a/src/librustc_typeck/check/wf.rs +++ b/src/librustc_typeck/check/wf.rs @@ -249,11 +249,6 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> { &fcx.inh.param_env.free_substs, &trait_ref); - if fcx.tcx().lang_items.copy_trait() == Some(trait_ref.def_id) { - // This is checked in coherence. - return - } - // We are stricter on the trait-ref in an impl than the // self-type. In particular, we enforce region // relationships. The reason for this is that (at least