diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-03-26 16:41:13 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-04-01 11:22:38 -0400 |
| commit | c4edd0c8dfa51bf0466b88271e108705738e2c47 (patch) | |
| tree | 4e9b9ff03ead0f73da10f7a767bc652a0085ce86 | |
| parent | 89436536246250ee3cbc47a61c31037ce7558c06 (diff) | |
Make the trait Copy extend Clone.
| -rw-r--r-- | src/libcore/marker.rs | 2 | ||||
| -rw-r--r-- | src/librustc_typeck/check/wf.rs | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index f755c912fcd..9503e439a8e 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 23e31df5395..a86e2b17c93 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 |
