about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-09-19 18:00:26 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-09-20 09:48:05 -0700
commit9117dcb968f96d0e9391dfac50348d4c031d89b3 (patch)
treea571f0c2ef1f91370cae51527f0e0761212a82e7 /src/libsyntax/parse/parser.rs
parent6b670c306b8de545afcbcea81bcd592c644409d7 (diff)
downloadrust-9117dcb968f96d0e9391dfac50348d4c031d89b3.tar.gz
rust-9117dcb968f96d0e9391dfac50348d4c031d89b3.zip
rustc: De-mode all overloaded operators
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index a1c1208d21c..a6ad5b35484 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -3647,12 +3647,21 @@ impl parser {
     }
 }
 
+#[cfg(stage0)]
 impl restriction : cmp::Eq {
     pure fn eq(&&other: restriction) -> bool {
         (self as uint) == (other as uint)
     }
     pure fn ne(&&other: restriction) -> bool { !self.eq(other) }
 }
+#[cfg(stage1)]
+#[cfg(stage2)]
+impl restriction : cmp::Eq {
+    pure fn eq(other: &restriction) -> bool {
+        (self as uint) == ((*other) as uint)
+    }
+    pure fn ne(other: &restriction) -> bool { !self.eq(other) }
+}
 
 //
 // Local Variables: