]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/empty-tag.rs
auto merge of #19514 : jbranchaud/rust/add-btree-set-bitor, r=Gankro
[rust.git] / src / test / run-pass / empty-tag.rs
index b79de737ce02b0ea6b30e007547ec5e0d6aa66b5..e5d11ac1adb2aeebfe2863c9be7701c1c20af482 100644 (file)
@@ -11,7 +11,9 @@
 #[deriving(Show)]
 enum chan { chan_t, }
 
-impl Eq for chan {
+impl Copy for chan {}
+
+impl PartialEq for chan {
     fn eq(&self, other: &chan) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
@@ -19,10 +21,10 @@ fn ne(&self, other: &chan) -> bool { !(*self).eq(other) }
 }
 
 fn wrapper3(i: chan) {
-    assert_eq!(i, chan_t);
+    assert_eq!(i, chan::chan_t);
 }
 
 pub fn main() {
-    let wrapped = {||wrapper3(chan_t)};
+    let wrapped = {||wrapper3(chan::chan_t)};
     wrapped();
 }