]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/coherence-impl-in-fn.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / coherence-impl-in-fn.rs
index 90cd3397c80e54a8171b62c06f93f1c4a0b4d9e8..6edd7390f0f31a37ad0cf088a3dec7ff0e2ec070 100644 (file)
@@ -8,12 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn main() {
+pub fn main() {
+    #[derive(Copy)]
     enum x { foo }
-    impl x : core::cmp::Eq {
-        pure fn eq(&self, other: &x) -> bool {
+    impl ::std::cmp::PartialEq for x {
+        fn eq(&self, other: &x) -> bool {
             (*self) as int == (*other) as int
         }
-        pure fn ne(&self, other: &x) -> bool { !(*self).eq(other) }
+        fn ne(&self, other: &x) -> bool { !(*self).eq(other) }
     }
 }