about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
commit8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 (patch)
tree7e3fd944a844a195a0ed1bed8717db07a2d8ccc8 /src/libstd
parentbe6613e048c889a0aeaff056131c2406259f1fb4 (diff)
downloadrust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.tar.gz
rust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.zip
Register snapshots
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/deque.rs61
-rw-r--r--src/libstd/getopts.rs142
-rw-r--r--src/libstd/json.rs139
-rw-r--r--src/libstd/list.rs23
-rw-r--r--src/libstd/net_url.rs45
-rw-r--r--src/libstd/sort.rs56
-rw-r--r--src/libstd/test.rs10
-rw-r--r--src/libstd/time.rs39
8 files changed, 3 insertions, 512 deletions
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs
index 44ddb307019..f33ff892f36 100644
--- a/src/libstd/deque.rs
+++ b/src/libstd/deque.rs
@@ -239,25 +239,6 @@ mod tests {
     type RecCy = {x: int, y: int, t: Taggy};
 
     impl Taggy : Eq {
-        #[cfg(stage0)]
-        pure fn eq(other: &Taggy) -> bool {
-            match self {
-              One(a1) => match (*other) {
-                One(b1) => return a1 == b1,
-                _ => return false
-              },
-              Two(a1, a2) => match (*other) {
-                Two(b1, b2) => return a1 == b1 && a2 == b2,
-                _ => return false
-              },
-              Three(a1, a2, a3) => match (*other) {
-                Three(b1, b2, b3) => return a1 == b1 && a2 == b2 && a3 == b3,
-                _ => return false
-              }
-            }
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn eq(&self, other: &Taggy) -> bool {
             match (*self) {
               One(a1) => match (*other) {
@@ -274,36 +255,11 @@ mod tests {
               }
             }
         }
-        #[cfg(stage0)]
-        pure fn ne(other: &Taggy) -> bool { !self.eq(other) }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn ne(&self, other: &Taggy) -> bool { !(*self).eq(other) }
     }
 
     impl Taggypar<int> : Eq {
         //let eq4: EqFn<Taggypar<int>> = |x,y| taggypareq::<int>(x, y);
-        #[cfg(stage0)]
-        pure fn eq(other: &Taggypar<int>) -> bool {
-                  match self {
-                    Onepar::<int>(a1) => match (*other) {
-                      Onepar::<int>(b1) => return a1 == b1,
-                      _ => return false
-                    },
-                    Twopar::<int>(a1, a2) => match (*other) {
-                      Twopar::<int>(b1, b2) => return a1 == b1 && a2 == b2,
-                      _ => return false
-                    },
-                    Threepar::<int>(a1, a2, a3) => match (*other) {
-                      Threepar::<int>(b1, b2, b3) => {
-                          return a1 == b1 && a2 == b2 && a3 == b3
-                      }
-                      _ => return false
-                    }
-                  }
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn eq(&self, other: &Taggypar<int>) -> bool {
                   match (*self) {
                     Onepar::<int>(a1) => match (*other) {
@@ -322,33 +278,16 @@ mod tests {
                     }
                   }
         }
-        #[cfg(stage0)]
-        pure fn ne(other: &Taggypar<int>) -> bool {
-            !self.eq(other)
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn ne(&self, other: &Taggypar<int>) -> bool {
             !(*self).eq(other)
         }
     }
 
     impl RecCy : Eq {
-        #[cfg(stage0)]
-        pure fn eq(other: &RecCy) -> bool {
-          return self.x == (*other).x && self.y == (*other).y &&
-                 self.t == (*other).t;
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn eq(&self, other: &RecCy) -> bool {
           return (*self).x == (*other).x && (*self).y == (*other).y &&
                  (*self).t == (*other).t;
         }
-        #[cfg(stage0)]
-        pure fn ne(other: &RecCy) -> bool { !self.eq(other) }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn ne(&self, other: &RecCy) -> bool { !(*self).eq(other) }
     }
 
diff --git a/src/libstd/getopts.rs b/src/libstd/getopts.rs
index cd7823b9747..44296a009e7 100644
--- a/src/libstd/getopts.rs
+++ b/src/libstd/getopts.rs
@@ -88,25 +88,6 @@ fn mkname(nm: &str) -> Name {
 }
 
 impl Name : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Name) -> bool {
-        match self {
-            Long(ref e0a) => {
-                match (*other) {
-                    Long(ref e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            Short(e0a) => {
-                match (*other) {
-                    Short(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Name) -> bool {
         match (*self) {
             Long(ref e0a) => {
@@ -123,65 +104,29 @@ impl Name : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Name) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Name) -> bool { !(*self).eq(other) }
 }
 
 impl Occur : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Occur) -> bool {
-        (self as uint) == ((*other) as uint)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Occur) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Occur) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Occur) -> bool { !(*self).eq(other) }
 }
 
 impl HasArg : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &HasArg) -> bool {
-        (self as uint) == ((*other) as uint)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &HasArg) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &HasArg) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &HasArg) -> bool { !(*self).eq(other) }
 }
 
 impl Opt : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Opt) -> bool {
-        self.name   == (*other).name   &&
-        self.hasarg == (*other).hasarg &&
-        self.occur  == (*other).occur
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Opt) -> bool {
         (*self).name   == (*other).name   &&
         (*self).hasarg == (*other).hasarg &&
         (*self).occur  == (*other).occur
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Opt) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Opt) -> bool { !(*self).eq(other) }
 }
 
@@ -227,17 +172,6 @@ enum Optval { Val(~str), Given, }
 pub type Matches = {opts: ~[Opt], vals: ~[~[Optval]], free: ~[~str]};
 
 impl Optval : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Optval) -> bool {
-        match self {
-            Val(ref s) => match *other { Val (ref os) => s == os,
-                                          Given => false },
-            Given       => match *other { Val(_) => false,
-                                          Given => true }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Optval) -> bool {
         match (*self) {
             Val(ref s) => match *other { Val (ref os) => s == os,
@@ -246,31 +180,15 @@ impl Optval : Eq {
                                           Given => true }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Optval) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Optval) -> bool { !(*self).eq(other) }
 }
 
 impl Matches : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Matches) -> bool {
-        self.opts == (*other).opts &&
-        self.vals == (*other).vals &&
-        self.free == (*other).free
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Matches) -> bool {
         (*self).opts == (*other).opts &&
         (*self).vals == (*other).vals &&
         (*self).free == (*other).free
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Matches) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Matches) -> bool { !(*self).eq(other) }
 }
 
@@ -303,33 +221,6 @@ pub enum Fail_ {
 
 impl Fail_ : Eq {
     // this whole thing should be easy to infer...
-    #[cfg(stage0)]
-    pure fn eq(other: &Fail_) -> bool {
-        match self {
-            ArgumentMissing(ref s) => {
-                match *other { ArgumentMissing(ref so)    => s == so,
-                               _                          => false }
-            }
-            UnrecognizedOption(ref s) => {
-                match *other { UnrecognizedOption(ref so) => s == so,
-                               _                          => false }
-            }
-            OptionMissing(ref s) => {
-                match *other { OptionMissing(ref so)      => s == so,
-                               _                          => false }
-            }
-            OptionDuplicated(ref s) => {
-                match *other { OptionDuplicated(ref so)   => s == so,
-                               _                          => false }
-            }
-            UnexpectedArgument(ref s) => {
-                match *other { UnexpectedArgument(ref so) => s == so,
-                               _                          => false }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Fail_) -> bool {
         match (*self) {
             ArgumentMissing(ref s) => {
@@ -354,10 +245,6 @@ impl Fail_ : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Fail_) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Fail_) -> bool { !(*self).eq(other) }
 }
 
@@ -627,19 +514,9 @@ enum FailType {
 }
 
 impl FailType : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &FailType) -> bool {
-        (self as uint) == ((*other) as uint)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &FailType) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &FailType) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &FailType) -> bool { !(*self).eq(other) }
 }
 
@@ -661,17 +538,6 @@ pub mod groups {
     };
 
     impl OptGroup : Eq {
-        #[cfg(stage0)]
-        pure fn eq(other: &OptGroup) -> bool {
-            self.short_name == (*other).short_name &&
-            self.long_name  == (*other).long_name  &&
-            self.hint       == (*other).hint       &&
-            self.desc       == (*other).desc       &&
-            self.hasarg     == (*other).hasarg     &&
-            self.occur      == (*other).occur
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn eq(&self, other: &OptGroup) -> bool {
             (*self).short_name == (*other).short_name &&
             (*self).long_name  == (*other).long_name  &&
@@ -680,11 +546,9 @@ pub mod groups {
             (*self).hasarg     == (*other).hasarg     &&
             (*self).occur      == (*other).occur
         }
-        #[cfg(stage0)]
-        pure fn ne(other: &OptGroup) -> bool { !self.eq(other) }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
-        pure fn ne(&self, other: &OptGroup) -> bool { !(*self).eq(other) }
+        pure fn ne(&self, other: &OptGroup) -> bool {
+            !self.eq(other)
+        }
     }
 
     /// Create a long option that is required and takes an argument
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index e638fc79746..8551072d461 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -905,44 +905,6 @@ pub impl Deserializer: serialization::Deserializer {
 }
 
 impl Json : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Json) -> bool {
-        // XXX: This is ugly because matching on references is broken, and
-        // we can't match on dereferenced tuples without a copy.
-        match self {
-            Number(f0) =>
-                match *other { Number(f1) => f0 == f1, _ => false },
-            String(ref s0) =>
-                match *other { String(ref s1) => s0 == s1, _ => false },
-            Boolean(b0) =>
-                match *other { Boolean(b1) => b0 == b1, _ => false },
-            Null =>
-                match *other { Null => true, _ => false },
-            List(v0) =>
-                match *other { List(v1) => v0 == v1, _ => false },
-            Object(ref d0) => {
-                match *other {
-                    Object(ref d1) => {
-                        if d0.len() == d1.len() {
-                            let mut equal = true;
-                            for d0.each |k, v0| {
-                                match d1.find_ref(k) {
-                                    Some(v1) if v0 == v1 => { },
-                                    _ => { equal = false; break }
-                                }
-                            };
-                            equal
-                        } else {
-                            false
-                        }
-                    }
-                    _ => false
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Json) -> bool {
         // XXX: This is ugly because matching on references is broken, and
         // we can't match on dereferenced tuples without a copy.
@@ -978,88 +940,11 @@ impl Json : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Json) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Json) -> bool { !(*self).eq(other) }
 }
 
 /// Test if two json values are less than one another
 impl Json : Ord {
-    #[cfg(stage0)]
-    pure fn lt(other: &Json) -> bool {
-        match self {
-            Number(f0) => {
-                match *other {
-                    Number(f1) => f0 < f1,
-                    String(_) | Boolean(_) | List(_) | Object(_) |
-                    Null => true
-                }
-            }
-
-            String(ref s0) => {
-                match *other {
-                    Number(_) => false,
-                    String(ref s1) => s0 < s1,
-                    Boolean(_) | List(_) | Object(_) | Null => true
-                }
-            }
-
-            Boolean(b0) => {
-                match *other {
-                    Number(_) | String(_) => false,
-                    Boolean(b1) => b0 < b1,
-                    List(_) | Object(_) | Null => true
-                }
-            }
-
-            List(l0) => {
-                match *other {
-                    Number(_) | String(_) | Boolean(_) => false,
-                    List(l1) => l0 < l1,
-                    Object(_) | Null => true
-                }
-            }
-
-            Object(ref d0) => {
-                match *other {
-                    Number(_) | String(_) | Boolean(_) | List(_) => false,
-                    Object(ref d1) => {
-                        unsafe {
-                            let mut d0_flat = ~[];
-                            let mut d1_flat = ~[];
-
-                            // XXX: this is horribly inefficient...
-                            for d0.each |k, v| {
-                                 d0_flat.push((@copy *k, @copy *v));
-                            }
-                            d0_flat.qsort();
-
-                            for d1.each |k, v| {
-                                d1_flat.push((@copy *k, @copy *v));
-                            }
-                            d1_flat.qsort();
-
-                            d0_flat < d1_flat
-                        }
-                    }
-                    Null => true
-                }
-            }
-
-            Null => {
-                match *other {
-                    Number(_) | String(_) | Boolean(_) | List(_) |
-                    Object(_) =>
-                        false,
-                    Null => true
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn lt(&self, other: &Json) -> bool {
         match (*self) {
             Number(f0) => {
@@ -1130,41 +1015,17 @@ impl Json : Ord {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn le(other: &Json) -> bool { !(*other).lt(&self) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
-    #[cfg(stage0)]
-    pure fn ge(other: &Json) -> bool { !self.lt(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
-    #[cfg(stage0)]
-    pure fn gt(other: &Json) -> bool { (*other).lt(&self)  }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self))  }
 }
 
 impl Error : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Error) -> bool {
-        self.line == other.line &&
-        self.col == other.col &&
-        self.msg == other.msg
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Error) -> bool {
         (*self).line == other.line &&
         (*self).col == other.col &&
         (*self).msg == other.msg
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Error) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Error) -> bool { !(*self).eq(other) }
 }
 
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index 35b9a92f5a8..ccff91634b8 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -148,25 +148,6 @@ pub fn each<T>(l: @List<T>, f: fn(&T) -> bool) {
 }
 
 impl<T:Eq> List<T> : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &List<T>) -> bool {
-        match self {
-            Cons(ref e0a, e1a) => {
-                match (*other) {
-                    Cons(ref e0b, e1b) => e0a == e0b && e1a == e1b,
-                    _ => false
-                }
-            }
-            Nil => {
-                match (*other) {
-                    Nil => true,
-                    _ => false
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &List<T>) -> bool {
         match (*self) {
             Cons(ref e0a, e1a) => {
@@ -183,10 +164,6 @@ impl<T:Eq> List<T> : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &List<T>) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &List<T>) -> bool { !(*self).eq(other) }
 }
 
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index ec9aa60de54..36fb86e0c49 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -315,19 +315,9 @@ pure fn userinfo_to_str(userinfo: UserInfo) -> ~str {
 }
 
 impl UserInfo : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &UserInfo) -> bool {
-        self.user == (*other).user && self.pass == (*other).pass
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &UserInfo) -> bool {
         (*self).user == (*other).user && (*self).pass == (*other).pass
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &UserInfo) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &UserInfo) -> bool { !(*self).eq(other) }
 }
 
@@ -389,19 +379,6 @@ enum Input {
 }
 
 impl Input : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Input) -> bool {
-        match (self, (*other)) {
-            (Digit, Digit) => true,
-            (Hex, Hex) => true,
-            (Unreserved, Unreserved) => true,
-            (Digit, _) => false,
-            (Hex, _) => false,
-            (Unreserved, _) => false
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Input) -> bool {
         match ((*self), (*other)) {
             (Digit, Digit) => true,
@@ -412,10 +389,6 @@ impl Input : Eq {
             (Unreserved, _) => false
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Input) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Input) -> bool { !(*self).eq(other) }
 }
 
@@ -749,18 +722,6 @@ impl Url: to_str::ToStr {
 }
 
 impl Url : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Url) -> bool {
-        self.scheme == (*other).scheme
-            && self.user == (*other).user
-            && self.host == (*other).host
-            && self.port == (*other).port
-            && self.path == (*other).path
-            && self.query == (*other).query
-            && self.fragment == (*other).fragment
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Url) -> bool {
         (*self).scheme == (*other).scheme
             && (*self).user == (*other).user
@@ -771,12 +732,6 @@ impl Url : Eq {
             && (*self).fragment == (*other).fragment
     }
 
-    #[cfg(stage0)]
-    pure fn ne(other: &Url) -> bool {
-        !self.eq(other)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Url) -> bool {
         !(*self).eq(other)
     }
diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs
index 73529fd2a93..c6e8c72e6d6 100644
--- a/src/libstd/sort.rs
+++ b/src/libstd/sort.rs
@@ -871,16 +871,6 @@ mod test_tim_sort {
     }
 
     impl CVal: Ord {
-        #[cfg(stage0)]
-        pure fn lt(other: &CVal) -> bool {
-            unsafe {
-                let rng = rand::Rng();
-                if rng.gen_float() > 0.995 { fail ~"It's happening!!!"; }
-            }
-            self.val < other.val
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn lt(&self, other: &CVal) -> bool {
             unsafe {
                 let rng = rand::Rng();
@@ -888,20 +878,8 @@ mod test_tim_sort {
             }
             (*self).val < other.val
         }
-        #[cfg(stage0)]
-        pure fn le(other: &CVal) -> bool { self.val <= other.val }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn le(&self, other: &CVal) -> bool { (*self).val <= other.val }
-        #[cfg(stage0)]
-        pure fn gt(other: &CVal) -> bool { self.val > other.val }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn gt(&self, other: &CVal) -> bool { (*self).val > other.val }
-        #[cfg(stage0)]
-        pure fn ge(other: &CVal) -> bool { self.val >= other.val }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn ge(&self, other: &CVal) -> bool { (*self).val >= other.val }
     }
 
@@ -957,16 +935,6 @@ mod test_tim_sort {
 
     struct DVal { val: uint }
 
-    #[cfg(stage0)]
-    impl DVal: Ord {
-        pure fn lt(_x: &DVal) -> bool { true }
-        pure fn le(_x: &DVal) -> bool { true }
-        pure fn gt(_x: &DVal) -> bool { true }
-        pure fn ge(_x: &DVal) -> bool { true }
-    }
-
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     impl DVal: Ord {
         pure fn lt(&self, _x: &DVal) -> bool { true }
         pure fn le(&self, _x: &DVal) -> bool { true }
@@ -1183,39 +1151,15 @@ mod big_tests {
     }
 
     impl LVal: Ord {
-        #[cfg(stage0)]
-        pure fn lt(other: &a/LVal/&self) -> bool {
-            self.val < other.val
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn lt(&self, other: &a/LVal/&self) -> bool {
             (*self).val < other.val
         }
-        #[cfg(stage0)]
-        pure fn le(other: &a/LVal/&self) -> bool {
-            self.val <= other.val
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn le(&self, other: &a/LVal/&self) -> bool {
             (*self).val <= other.val
         }
-        #[cfg(stage0)]
-        pure fn gt(other: &a/LVal/&self) -> bool {
-            self.val > other.val
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn gt(&self, other: &a/LVal/&self) -> bool {
             (*self).val > other.val
         }
-        #[cfg(stage0)]
-        pure fn ge(other: &a/LVal/&self) -> bool {
-            self.val >= other.val
-        }
-        #[cfg(stage1)]
-        #[cfg(stage2)]
         pure fn ge(&self, other: &a/LVal/&self) -> bool {
             (*self).val >= other.val
         }
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index 54f011d246c..b3b5e978414 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -85,19 +85,9 @@ fn parse_opts(args: &[~str]) -> OptRes {
 pub enum TestResult { TrOk, TrFailed, TrIgnored, }
 
 impl TestResult : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &TestResult) -> bool {
-        (self as uint) == ((*other) as uint)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &TestResult) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &TestResult) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &TestResult) -> bool { !(*self).eq(other) }
 }
 
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 405d1d7abad..7596f4282b7 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -24,19 +24,9 @@ extern mod rustrt {
 pub type Timespec = {sec: i64, nsec: i32};
 
 impl Timespec : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Timespec) -> bool {
-        self.sec == (*other).sec && self.nsec == (*other).nsec
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Timespec) -> bool {
         (*self).sec == (*other).sec && (*self).nsec == (*other).nsec
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Timespec) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Timespec) -> bool { !(*self).eq(other) }
 }
 
@@ -91,23 +81,6 @@ type Tm_ = {
 };
 
 impl Tm_ : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Tm_) -> bool {
-        self.tm_sec == (*other).tm_sec &&
-        self.tm_min == (*other).tm_min &&
-        self.tm_hour == (*other).tm_hour &&
-        self.tm_mday == (*other).tm_mday &&
-        self.tm_mon == (*other).tm_mon &&
-        self.tm_year == (*other).tm_year &&
-        self.tm_wday == (*other).tm_wday &&
-        self.tm_yday == (*other).tm_yday &&
-        self.tm_isdst == (*other).tm_isdst &&
-        self.tm_gmtoff == (*other).tm_gmtoff &&
-        self.tm_zone == (*other).tm_zone &&
-        self.tm_nsec == (*other).tm_nsec
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Tm_) -> bool {
         (*self).tm_sec == (*other).tm_sec &&
         (*self).tm_min == (*other).tm_min &&
@@ -122,10 +95,6 @@ impl Tm_ : Eq {
         (*self).tm_zone == (*other).tm_zone &&
         (*self).tm_nsec == (*other).tm_nsec
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Tm_) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Tm_) -> bool { !(*self).eq(other) }
 }
 
@@ -134,15 +103,7 @@ pub enum Tm {
 }
 
 impl Tm : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Tm) -> bool { *self == *(*other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Tm) -> bool { *(*self) == *(*other) }
-    #[cfg(stage0)]
-    pure fn ne(other: &Tm) -> bool { *self != *(*other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Tm) -> bool { *(*self) != *(*other) }
 }