about summary refs log tree commit diff
path: root/src/libcore/io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/io.rs')
-rw-r--r--src/libcore/io.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libcore/io.rs b/src/libcore/io.rs
index 535ab883581..2c92e70c7d9 100644
--- a/src/libcore/io.rs
+++ b/src/libcore/io.rs
@@ -523,13 +523,26 @@ pub enum FileFlag { Append, Create, Truncate, NoFlag, }
 pub enum WriterType { Screen, File }
 
 pub impl WriterType : Eq {
+    #[cfg(stage0)]
     pure fn eq(other: &WriterType) -> bool {
         match (self, (*other)) {
             (Screen, Screen) | (File, File) => true,
             (Screen, _) | (File, _) => false
         }
     }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn eq(&self, other: &WriterType) -> bool {
+        match ((*self), (*other)) {
+            (Screen, Screen) | (File, File) => true,
+            (Screen, _) | (File, _) => false
+        }
+    }
+    #[cfg(stage0)]
     pure fn ne(other: &WriterType) -> bool { !self.eq(other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn ne(&self, other: &WriterType) -> bool { !(*self).eq(other) }
 }
 
 // FIXME (#2004): Seekable really should be orthogonal.