]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/empty-tag.rs
rollup merge of #19577: aidancully/master
[rust.git] / src / test / run-pass / empty-tag.rs
index ca81489e0bdb73cadbb7422740790c35938c06e2..e5d11ac1adb2aeebfe2863c9be7701c1c20af482 100644 (file)
@@ -8,20 +8,23 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[deriving(Show)]
 enum chan { chan_t, }
 
-impl cmp::Eq for chan {
-    pure fn eq(&self, other: &chan) -> bool {
+impl Copy for chan {}
+
+impl PartialEq for chan {
+    fn eq(&self, other: &chan) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    pure fn ne(&self, other: &chan) -> bool { !(*self).eq(other) }
+    fn ne(&self, other: &chan) -> bool { !(*self).eq(other) }
 }
 
 fn wrapper3(i: chan) {
-    fail_unless!(i == chan_t);
+    assert_eq!(i, chan::chan_t);
 }
 
 pub fn main() {
-    let wrapped = {||wrapper3(chan_t)};
+    let wrapped = {||wrapper3(chan::chan_t)};
     wrapped();
 }