Make the trait Copy extend Clone.

This commit is contained in:
Niko Matsakis 2015-03-26 16:41:13 -04:00
parent 8943653624
commit c4edd0c8df
2 changed files with 1 additions and 6 deletions

View file

@ -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.
}

View file

@ -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