diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-29 17:45:07 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-30 15:52:24 -0700 |
| commit | 748bc3ca49de8ab0b890726120c40567094e43fc (patch) | |
| tree | a205dcd5582cbecbb1a02fa3ed1ebfdcc85ff881 /src/test/run-pass/deriving-cmp-generic-struct-enum.rs | |
| parent | f4fa7c8a07a96cc9d0aae0bfc6515fb747f25341 (diff) | |
| download | rust-748bc3ca49de8ab0b890726120c40567094e43fc.tar.gz rust-748bc3ca49de8ab0b890726120c40567094e43fc.zip | |
std: Rename {Eq,Ord} to Partial{Eq,Ord}
This is part of the ongoing renaming of the equality traits. See #12517 for more
details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord}
or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}.
cc #12517
[breaking-change]
Diffstat (limited to 'src/test/run-pass/deriving-cmp-generic-struct-enum.rs')
| -rw-r--r-- | src/test/run-pass/deriving-cmp-generic-struct-enum.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 9dc5bcc0f02..a6040049a2f 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(Eq, TotalEq, Ord, TotalOrd)] +#[deriving(PartialEq, TotalEq, PartialOrd, TotalOrd)] 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 Ord and TotalOrd + // in order for both PartialOrd and TotalOrd let ess = [es11, es12, es21, es22]; for (i, es1) in ess.iter().enumerate() { @@ -31,11 +31,11 @@ pub fn main() { let (lt, le) = (i < j, i <= j); let (gt, ge) = (i > j, i >= j); - // Eq + // PartialEq assert_eq!(*es1 == *es2, eq); assert_eq!(*es1 != *es2, !eq); - // Ord + // PartialOrd assert_eq!(*es1 < *es2, lt); assert_eq!(*es1 > *es2, gt); |
