about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-31 10:43:52 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-01 10:31:27 -0700
commitbba701c59d84eac4e20d0796ec06db8d1cdd39cf (patch)
tree3c2109ca567bbc7e7b8d66da7282dac8f8926da6 /src/test
parentc605c2b57b412402e6b491e91852fd9dbadeb551 (diff)
downloadrust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.tar.gz
rust-bba701c59d84eac4e20d0796ec06db8d1cdd39cf.zip
std: Drop Total from Total{Eq,Ord}
This completes the last stage of the renaming of the comparison hierarchy of
traits. This change renames TotalEq to Eq and TotalOrd to Ord.

In the future the new Eq/Ord will be filled out with their appropriate methods,
but for now this change is purely a renaming change.

[breaking-change]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/shootout-k-nucleotide.rs2
-rw-r--r--src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/deriving-span-TotalEq-enum.rs2
-rw-r--r--src/test/compile-fail/deriving-span-TotalEq-struct.rs2
-rw-r--r--src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs4
-rw-r--r--src/test/compile-fail/deriving-span-TotalOrd-enum.rs4
-rw-r--r--src/test/compile-fail/deriving-span-TotalOrd-struct.rs4
-rw-r--r--src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs4
-rw-r--r--src/test/run-pass/deriving-cmp-generic-enum.rs6
-rw-r--r--src/test/run-pass/deriving-cmp-generic-struct-enum.rs6
-rw-r--r--src/test/run-pass/deriving-cmp-generic-struct.rs6
-rw-r--r--src/test/run-pass/deriving-cmp-generic-tuple-struct.rs6
-rw-r--r--src/test/run-pass/deriving-cmp-shortcircuit.rs6
-rw-r--r--src/test/run-pass/deriving-global.rs6
-rw-r--r--src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs2
-rw-r--r--src/test/run-pass/issue-12860.rs2
-rw-r--r--src/test/run-pass/regions-mock-tcx.rs4
-rw-r--r--src/test/run-pass/vector-sort-failure-safe.rs2
19 files changed, 36 insertions, 36 deletions
diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs
index 45cd93188b2..6c038e28bb9 100644
--- a/src/test/bench/shootout-k-nucleotide.rs
+++ b/src/test/bench/shootout-k-nucleotide.rs
@@ -30,7 +30,7 @@ static OCCURRENCES: [&'static str, ..5] = [
 
 // Code implementation
 
-#[deriving(PartialEq, PartialOrd, TotalOrd, TotalEq)]
+#[deriving(PartialEq, PartialOrd, Ord, Eq)]
 struct Code(u64);
 
 impl Code {
diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs
index 07fc3d5c5d9..964e7d8c811 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs
+++ b/src/test/compile-fail/deriving-span-TotalEq-enum-struct-variant.rs
@@ -16,7 +16,7 @@ extern crate rand;
 #[deriving(PartialEq)]
 struct Error;
 
-#[deriving(TotalEq,PartialEq)]
+#[deriving(Eq,PartialEq)]
 enum Enum {
    A {
      x: Error //~ ERROR
diff --git a/src/test/compile-fail/deriving-span-TotalEq-enum.rs b/src/test/compile-fail/deriving-span-TotalEq-enum.rs
index e25ebaf7f1b..96e87ca2006 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-enum.rs
+++ b/src/test/compile-fail/deriving-span-TotalEq-enum.rs
@@ -16,7 +16,7 @@ extern crate rand;
 #[deriving(PartialEq)]
 struct Error;
 
-#[deriving(TotalEq,PartialEq)]
+#[deriving(Eq,PartialEq)]
 enum Enum {
    A(
      Error //~ ERROR
diff --git a/src/test/compile-fail/deriving-span-TotalEq-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-struct.rs
index b9b50e5d60b..784c766c057 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-struct.rs
+++ b/src/test/compile-fail/deriving-span-TotalEq-struct.rs
@@ -16,7 +16,7 @@ extern crate rand;
 #[deriving(PartialEq)]
 struct Error;
 
-#[deriving(TotalEq,PartialEq)]
+#[deriving(Eq,PartialEq)]
 struct Struct {
     x: Error //~ ERROR
 }
diff --git a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs
index b6123df4506..3dcff5f80ce 100644
--- a/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs
+++ b/src/test/compile-fail/deriving-span-TotalEq-tuple-struct.rs
@@ -16,7 +16,7 @@ extern crate rand;
 #[deriving(PartialEq)]
 struct Error;
 
-#[deriving(TotalEq,PartialEq)]
+#[deriving(Eq,PartialEq)]
 struct Struct(
     Error //~ ERROR
 );
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs
index a8116a817a8..c16e64829dd 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs
+++ b/src/test/compile-fail/deriving-span-TotalOrd-enum-struct-variant.rs
@@ -13,10 +13,10 @@
 #![feature(struct_variant)]
 extern crate rand;
 
-#[deriving(TotalEq,PartialOrd,PartialEq)]
+#[deriving(Eq,PartialOrd,PartialEq)]
 struct Error;
 
-#[deriving(TotalOrd,TotalEq,PartialOrd,PartialEq)]
+#[deriving(Ord,Eq,PartialOrd,PartialEq)]
 enum Enum {
    A {
      x: Error //~ ERROR
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs
index 0e1dc003fbb..4b3f0ce52c7 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-enum.rs
+++ b/src/test/compile-fail/deriving-span-TotalOrd-enum.rs
@@ -13,10 +13,10 @@
 #![feature(struct_variant)]
 extern crate rand;
 
-#[deriving(TotalEq,PartialOrd,PartialEq)]
+#[deriving(Eq,PartialOrd,PartialEq)]
 struct Error;
 
-#[deriving(TotalOrd,TotalEq,PartialOrd,PartialEq)]
+#[deriving(Ord,Eq,PartialOrd,PartialEq)]
 enum Enum {
    A(
      Error //~ ERROR
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs
index af6f09c4a2c..56d62742378 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-struct.rs
+++ b/src/test/compile-fail/deriving-span-TotalOrd-struct.rs
@@ -13,10 +13,10 @@
 #![feature(struct_variant)]
 extern crate rand;
 
-#[deriving(TotalEq,PartialOrd,PartialEq)]
+#[deriving(Eq,PartialOrd,PartialEq)]
 struct Error;
 
-#[deriving(TotalOrd,TotalEq,PartialOrd,PartialEq)]
+#[deriving(Ord,Eq,PartialOrd,PartialEq)]
 struct Struct {
     x: Error //~ ERROR
 }
diff --git a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs
index b58dc56a261..2330fdd8b89 100644
--- a/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs
+++ b/src/test/compile-fail/deriving-span-TotalOrd-tuple-struct.rs
@@ -13,10 +13,10 @@
 #![feature(struct_variant)]
 extern crate rand;
 
-#[deriving(TotalEq,PartialOrd,PartialEq)]
+#[deriving(Eq,PartialOrd,PartialEq)]
 struct Error;
 
-#[deriving(TotalOrd,TotalEq,PartialOrd,PartialEq)]
+#[deriving(Ord,Eq,PartialOrd,PartialEq)]
 struct Struct(
     Error //~ ERROR
 );
diff --git a/src/test/run-pass/deriving-cmp-generic-enum.rs b/src/test/run-pass/deriving-cmp-generic-enum.rs
index e280da10990..48e6cae706e 100644
--- a/src/test/run-pass/deriving-cmp-generic-enum.rs
+++ b/src/test/run-pass/deriving-cmp-generic-enum.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[deriving(PartialEq, TotalEq, PartialOrd, TotalOrd)]
+#[deriving(PartialEq, Eq, PartialOrd, Ord)]
 enum E<T> {
     E0,
     E1(T),
@@ -22,7 +22,7 @@ pub fn main() {
     let e21 = E2(1, 1);
     let e22 = E2(1, 2);
 
-    // in order for both PartialOrd and TotalOrd
+    // in order for both PartialOrd and Ord
     let es = [e0, e11, e12, e21, e22];
 
     for (i, e1) in es.iter().enumerate() {
@@ -46,7 +46,7 @@ pub fn main() {
             assert_eq!(*e1 <= *e2, le);
             assert_eq!(*e1 >= *e2, ge);
 
-            // TotalOrd
+            // Ord
             assert_eq!(e1.cmp(e2), ord);
         }
     }
diff --git a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs
index a6040049a2f..5958538d80e 100644
--- a/src/test/run-pass/deriving-cmp-generic-struct-enum.rs
+++ b/src/test/run-pass/deriving-cmp-generic-struct-enum.rs
@@ -10,7 +10,7 @@
 
 #![feature(struct_variant)]
 
-#[deriving(PartialEq, TotalEq, PartialOrd, TotalOrd)]
+#[deriving(PartialEq, Eq, PartialOrd, Ord)]
 enum ES<T> {
     ES1 { x: T },
     ES2 { x: T, y: T }
@@ -20,7 +20,7 @@ enum ES<T> {
 pub fn main() {
     let (es11, es12, es21, es22) = (ES1 {x: 1}, ES1 {x: 2}, ES2 {x: 1, y: 1}, ES2 {x: 1, y: 2});
 
-    // in order for both PartialOrd and TotalOrd
+    // in order for both PartialOrd and Ord
     let ess = [es11, es12, es21, es22];
 
     for (i, es1) in ess.iter().enumerate() {
@@ -42,7 +42,7 @@ pub fn main() {
             assert_eq!(*es1 <= *es2, le);
             assert_eq!(*es1 >= *es2, ge);
 
-            // TotalOrd
+            // Ord
             assert_eq!(es1.cmp(es2), ord);
         }
     }
diff --git a/src/test/run-pass/deriving-cmp-generic-struct.rs b/src/test/run-pass/deriving-cmp-generic-struct.rs
index 36ec0e834ba..5a6daa6d520 100644
--- a/src/test/run-pass/deriving-cmp-generic-struct.rs
+++ b/src/test/run-pass/deriving-cmp-generic-struct.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[deriving(PartialEq, TotalEq, PartialOrd, TotalOrd)]
+#[deriving(PartialEq, Eq, PartialOrd, Ord)]
 struct S<T> {
     x: T,
     y: T
@@ -18,7 +18,7 @@ pub fn main() {
     let s1 = S {x: 1, y: 1};
     let s2 = S {x: 1, y: 2};
 
-    // in order for both PartialOrd and TotalOrd
+    // in order for both PartialOrd and Ord
     let ss = [s1, s2];
 
     for (i, s1) in ss.iter().enumerate() {
@@ -42,7 +42,7 @@ pub fn main() {
             assert_eq!(*s1 <= *s2, le);
             assert_eq!(*s1 >= *s2, ge);
 
-            // TotalOrd
+            // Ord
             assert_eq!(s1.cmp(s2), ord);
         }
     }
diff --git a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs
index b67da8940ff..875c33b9810 100644
--- a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs
+++ b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[deriving(PartialEq, TotalEq, PartialOrd, TotalOrd)]
+#[deriving(PartialEq, Eq, PartialOrd, Ord)]
 struct TS<T>(T,T);
 
 
@@ -16,7 +16,7 @@ pub fn main() {
     let ts1 = TS(1, 1);
     let ts2 = TS(1, 2);
 
-    // in order for both PartialOrd and TotalOrd
+    // in order for both PartialOrd and Ord
     let tss = [ts1, ts2];
 
     for (i, ts1) in tss.iter().enumerate() {
@@ -40,7 +40,7 @@ pub fn main() {
             assert_eq!(*ts1 <= *ts2, le);
             assert_eq!(*ts1 >= *ts2, ge);
 
-            // TotalOrd
+            // Ord
             assert_eq!(ts1.cmp(ts2), ord);
         }
     }
diff --git a/src/test/run-pass/deriving-cmp-shortcircuit.rs b/src/test/run-pass/deriving-cmp-shortcircuit.rs
index 45beda9684d..69ee47fd1d9 100644
--- a/src/test/run-pass/deriving-cmp-shortcircuit.rs
+++ b/src/test/run-pass/deriving-cmp-shortcircuit.rs
@@ -21,13 +21,13 @@ impl PartialOrd for FailCmp {
     fn lt(&self, _: &FailCmp) -> bool { fail!("lt") }
 }
 
-impl TotalEq for FailCmp {}
+impl Eq for FailCmp {}
 
-impl TotalOrd for FailCmp {
+impl Ord for FailCmp {
     fn cmp(&self, _: &FailCmp) -> Ordering { fail!("cmp") }
 }
 
-#[deriving(PartialEq,PartialOrd,TotalEq,TotalOrd)]
+#[deriving(PartialEq,PartialOrd,Eq,Ord)]
 struct ShortCircuit {
     x: int,
     y: FailCmp
diff --git a/src/test/run-pass/deriving-global.rs b/src/test/run-pass/deriving-global.rs
index 1f9a5cab3b7..2322675661c 100644
--- a/src/test/run-pass/deriving-global.rs
+++ b/src/test/run-pass/deriving-global.rs
@@ -15,21 +15,21 @@ mod submod {
     // if any of these are implemented without global calls for any
     // function calls, then being in a submodule will (correctly)
     // cause errors about unrecognised module `std` (or `extra`)
-    #[deriving(PartialEq, PartialOrd, TotalEq, TotalOrd,
+    #[deriving(PartialEq, PartialOrd, Eq, Ord,
                Hash,
                Clone,
                Show, Rand,
                Encodable, Decodable)]
     enum A { A1(uint), A2(int) }
 
-    #[deriving(PartialEq, PartialOrd, TotalEq, TotalOrd,
+    #[deriving(PartialEq, PartialOrd, Eq, Ord,
                Hash,
                Clone,
                Show, Rand,
                Encodable, Decodable)]
     struct B { x: uint, y: int }
 
-    #[deriving(PartialEq, PartialOrd, TotalEq, TotalOrd,
+    #[deriving(PartialEq, PartialOrd, Eq, Ord,
                Hash,
                Clone,
                Show, Rand,
diff --git a/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs b/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs
index 1c921041042..1187a9a8bc4 100644
--- a/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs
+++ b/src/test/run-pass/deriving-self-lifetime-totalord-totaleq.rs
@@ -12,7 +12,7 @@
 
 use std::cmp::{Less,Equal,Greater};
 
-#[deriving(TotalEq,TotalOrd)]
+#[deriving(Eq,Ord)]
 struct A<'a> {
     x: &'a int
 }
diff --git a/src/test/run-pass/issue-12860.rs b/src/test/run-pass/issue-12860.rs
index 863245d42f0..b133f627439 100644
--- a/src/test/run-pass/issue-12860.rs
+++ b/src/test/run-pass/issue-12860.rs
@@ -13,7 +13,7 @@ extern crate collections;
 
 use collections::HashSet;
 
-#[deriving(PartialEq, TotalEq, Hash)]
+#[deriving(PartialEq, Eq, Hash)]
 struct XYZ {
     x: int,
     y: int,
diff --git a/src/test/run-pass/regions-mock-tcx.rs b/src/test/run-pass/regions-mock-tcx.rs
index 1d7521b7450..b8e6a5fb03e 100644
--- a/src/test/run-pass/regions-mock-tcx.rs
+++ b/src/test/run-pass/regions-mock-tcx.rs
@@ -40,7 +40,7 @@ impl<'tcx> PartialEq for TypeStructure<'tcx> {
     }
 }
 
-impl<'tcx> TotalEq for TypeStructure<'tcx> {}
+impl<'tcx> Eq for TypeStructure<'tcx> {}
 
 struct TypeContext<'tcx, 'ast> {
     ty_arena: &'tcx Arena,
@@ -86,7 +86,7 @@ impl<'tcx,'ast> TypeContext<'tcx, 'ast> {
     }
 }
 
-#[deriving(PartialEq, TotalEq, Hash)]
+#[deriving(PartialEq, Eq, Hash)]
 struct NodeId {
     id: uint
 }
diff --git a/src/test/run-pass/vector-sort-failure-safe.rs b/src/test/run-pass/vector-sort-failure-safe.rs
index e4e419e4988..2575e53b6a3 100644
--- a/src/test/run-pass/vector-sort-failure-safe.rs
+++ b/src/test/run-pass/vector-sort-failure-safe.rs
@@ -15,7 +15,7 @@ static MAX_LEN: uint = 20;
 static mut drop_counts: [uint, .. MAX_LEN] = [0, .. MAX_LEN];
 static mut clone_count: uint = 0;
 
-#[deriving(Rand, PartialEq, PartialOrd, TotalEq, TotalOrd)]
+#[deriving(Rand, PartialEq, PartialOrd, Eq, Ord)]
 struct DropCounter { x: uint, clone_num: uint }
 
 impl Clone for DropCounter {