about summary refs log tree commit diff
path: root/src/libsyntax/parse/comments.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-11-14 18:59:30 -0800
committerPatrick Walton <pcwalton@mimiga.net>2012-11-19 15:33:11 -0800
commit318e534895f20e7991abbc644eec311816010ef1 (patch)
tree764ce1ae3e9efbecd4fdc057663beb522b10bda9 /src/libsyntax/parse/comments.rs
parent4101587a88d719659d2e30feaad8437c55af9150 (diff)
downloadrust-318e534895f20e7991abbc644eec311816010ef1.tar.gz
rust-318e534895f20e7991abbc644eec311816010ef1.zip
rustc: Implement explicit self for Eq and Ord. r=graydon
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
-rw-r--r--src/libsyntax/parse/comments.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs
index 2a8bbe3b6d8..3cb6b08d976 100644
--- a/src/libsyntax/parse/comments.rs
+++ b/src/libsyntax/parse/comments.rs
@@ -20,12 +20,24 @@ enum cmnt_style {
 }
 
 impl cmnt_style : cmp::Eq {
+    #[cfg(stage0)]
     pure fn eq(other: &cmnt_style) -> bool {
         (self as uint) == ((*other) as uint)
     }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn eq(&self, other: &cmnt_style) -> bool {
+        ((*self) as uint) == ((*other) as uint)
+    }
+    #[cfg(stage0)]
     pure fn ne(other: &cmnt_style) -> bool {
         (self as uint) != ((*other) as uint)
     }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn ne(&self, other: &cmnt_style) -> bool {
+        ((*self) as uint) != ((*other) as uint)
+    }
 }
 
 type cmnt = {style: cmnt_style, lines: ~[~str], pos: BytePos};