Skip to content

Commit c4edd0c

Browse files
committed
Make the trait Copy extend Clone.
1 parent 8943653 commit c4edd0c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/libcore/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub trait Sized : MarkerTrait {
154154
/// change: that second example would fail to compile if we made `Foo` non-`Copy`.
155155
#[stable(feature = "rust1", since = "1.0.0")]
156156
#[lang="copy"]
157-
pub trait Copy : MarkerTrait {
157+
pub trait Copy : Clone {
158158
// Empty.
159159
}
160160

src/librustc_typeck/check/wf.rs

-5
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
249249
&fcx.inh.param_env.free_substs,
250250
&trait_ref);
251251

252-
if fcx.tcx().lang_items.copy_trait() == Some(trait_ref.def_id) {
253-
// This is checked in coherence.
254-
return
255-
}
256-
257252
// We are stricter on the trait-ref in an impl than the
258253
// self-type. In particular, we enforce region
259254
// relationships. The reason for this is that (at least

0 commit comments

Comments
 (0)