diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-03-23 22:54:42 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-03-23 23:48:10 +1100 |
| commit | f6db0ef9464a17fa6e547e755b1b5dfa09af9499 (patch) | |
| tree | 671ec7c6a30cc425d47f83ca1b4efd2f1c71dbca /src/test/run-pass/deriving-cmp-generic-tuple-struct.rs | |
| parent | 2ddb60565423bdc225ccc8dd4ebfb653c5650ba2 (diff) | |
| download | rust-f6db0ef9464a17fa6e547e755b1b5dfa09af9499.tar.gz rust-f6db0ef9464a17fa6e547e755b1b5dfa09af9499.zip | |
std: remove the `equals` method from `TotalEq`.
`TotalEq` is now just an assertion about the `Eq` impl of a type (i.e. `==` is a total equality if a type implements `TotalEq`) so the extra method is just confusing. Also, a new method magically appeared as a hack to allow deriving to assert that the contents of a struct/enum are also TotalEq, because the deriving infrastructure makes it very hard to do anything but create a trait method. (You didn't hear about this horrible work-around from me :(.)
Diffstat (limited to 'src/test/run-pass/deriving-cmp-generic-tuple-struct.rs')
| -rw-r--r-- | src/test/run-pass/deriving-cmp-generic-tuple-struct.rs | 3 |
1 files changed, 0 insertions, 3 deletions
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 5d4cf7c7457..b8ba4c64616 100644 --- a/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs +++ b/src/test/run-pass/deriving-cmp-generic-tuple-struct.rs @@ -33,9 +33,6 @@ pub fn main() { assert_eq!(*ts1 == *ts2, eq); assert_eq!(*ts1 != *ts2, !eq); - // TotalEq - assert_eq!(ts1.equals(ts2), eq); - // Ord assert_eq!(*ts1 < *ts2, lt); assert_eq!(*ts1 > *ts2, gt); |
