@@ -14,70 +14,35 @@ and `Eq` to overload the `==` and `!=` operators.
14
14
#[ forbid( deprecated_mode) ] ;
15
15
#[ forbid( deprecated_pattern) ] ;
16
16
17
- pub use nounittest:: * ;
18
- pub use unittest:: * ;
19
-
20
- /// Interfaces used for comparison.
21
-
22
- // Awful hack to work around duplicate lang items in core test.
23
- #[ cfg( notest) ]
24
- mod nounittest {
25
- /**
26
- * Trait for values that can be compared for a sort-order.
27
- *
28
- * Eventually this may be simplified to only require
29
- * an `le` method, with the others generated from
30
- * default implementations.
31
- */
32
- #[ lang="ord" ]
33
- pub trait Ord {
34
- pure fn lt ( & self , other: & self ) -> bool ;
35
- pure fn le ( & self , other: & self ) -> bool ;
36
- pure fn ge ( & self , other: & self ) -> bool ;
37
- pure fn gt ( & self , other: & self ) -> bool ;
38
- }
39
-
40
- #[ lang="eq" ]
41
- /**
42
- * Trait for values that can be compared for equality
43
- * and inequality.
44
- *
45
- * Eventually this may be simplified to only require
46
- * an `eq` method, with the other generated from
47
- * a default implementation.
48
- */
49
- #[ lang="eq" ]
50
- pub trait Eq {
51
- pure fn eq ( & self , other: & self ) -> bool ;
52
- pure fn ne ( & self , other: & self ) -> bool ;
53
- }
17
+ /**
18
+ * Trait for values that can be compared for equality
19
+ * and inequality.
20
+ *
21
+ * Eventually this may be simplified to only require
22
+ * an `eq` method, with the other generated from
23
+ * a default implementation.
24
+ */
25
+ #[ lang="eq" ]
26
+ pub trait Eq {
27
+ pure fn eq ( & self , other: & self ) -> bool ;
28
+ pure fn ne ( & self , other: & self ) -> bool ;
54
29
}
55
30
56
- #[ cfg( test) ]
57
- mod nounittest {
58
- #[ legacy_exports] ; }
59
-
60
- #[ cfg( test) ]
61
- mod unittest {
62
- #[ legacy_exports] ;
63
-
64
- pub trait Ord {
65
- pure fn lt ( & self , other: & self ) -> bool ;
66
- pure fn le ( & self , other: & self ) -> bool ;
67
- pure fn ge ( & self , other: & self ) -> bool ;
68
- pure fn gt ( & self , other: & self ) -> bool ;
69
- }
70
-
71
- pub trait Eq {
72
- pure fn eq ( & self , other: & self ) -> bool ;
73
- pure fn ne ( & self , other: & self ) -> bool ;
74
- }
31
+ /**
32
+ * Trait for values that can be compared for a sort-order.
33
+ *
34
+ * Eventually this may be simplified to only require
35
+ * an `le` method, with the others generated from
36
+ * default implementations.
37
+ */
38
+ #[ lang="ord" ]
39
+ pub trait Ord {
40
+ pure fn lt ( & self , other: & self ) -> bool ;
41
+ pure fn le ( & self , other: & self ) -> bool ;
42
+ pure fn ge ( & self , other: & self ) -> bool ;
43
+ pure fn gt ( & self , other: & self ) -> bool ;
75
44
}
76
45
77
- #[ cfg( notest) ]
78
- mod unittest {
79
- #[ legacy_exports] ; }
80
-
81
46
pub pure fn lt < T : Ord > ( v1 : & T , v2 : & T ) -> bool {
82
47
( * v1) . lt ( v2)
83
48
}
0 commit comments