File tree Expand file tree Collapse file tree 4 files changed +28
-18
lines changed Expand file tree Collapse file tree 4 files changed +28
-18
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 0c6e470a257fc546555aa10ededded4a77460a71
2
+ refs/heads/master: 180202fa4d5db2b32216f35ec9a8b3c05252efc1
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change @@ -16,14 +16,17 @@ trait Eq {
16
16
pure fn eq ( & & other: self ) -> bool ;
17
17
}
18
18
19
+ #[ cfg( notest) ]
19
20
pure fn lt < T : Ord > ( v1 : & T , v2 : & T ) -> bool {
20
21
v1. lt ( * v2)
21
22
}
22
23
24
+ #[ cfg( notest) ]
23
25
pure fn le < T : Ord Eq > ( v1 : & T , v2 : & T ) -> bool {
24
26
v1. lt ( * v2) || v1. eq ( * v2)
25
27
}
26
28
29
+ #[ cfg( notest) ]
27
30
pure fn eq < T : Eq > ( v1 : & T , v2 : & T ) -> bool {
28
31
v1. eq ( * v2)
29
32
}
Original file line number Diff line number Diff line change 1
1
import T = inst:: T ;
2
- import cmp:: { Eq , Ord } ;
3
2
import num:: from_int;
4
3
5
4
export min_value, max_value;
@@ -63,19 +62,23 @@ pure fn abs(i: T) -> T {
63
62
if is_negative ( i) { -i } else { i }
64
63
}
65
64
66
- impl T : Ord {
67
- pure fn lt ( & & other: T ) -> bool {
68
- return self < other;
65
+ #[ cfg( notest) ]
66
+ mod impls {
67
+ import cmp:: { Eq , Ord } ;
68
+
69
+ impl T : Ord {
70
+ pure fn lt ( & & other: T ) -> bool {
71
+ return self < other;
72
+ }
69
73
}
70
- }
71
74
72
- impl T : Eq {
73
- pure fn eq ( & & other: T ) -> bool {
74
- return self == other;
75
+ impl T : Eq {
76
+ pure fn eq ( & & other: T ) -> bool {
77
+ return self == other;
78
+ }
75
79
}
76
80
}
77
81
78
-
79
82
impl T : num:: Num {
80
83
pure fn add ( & & other: T ) -> T { return self + other; }
81
84
pure fn sub ( & & other: T ) -> T { return self - other; }
Original file line number Diff line number Diff line change 1
1
import T = inst:: T ;
2
- import cmp:: { Eq , Ord } ;
3
2
4
3
export min_value, max_value;
5
4
export min, max;
@@ -56,15 +55,20 @@ pure fn compl(i: T) -> T {
56
55
max_value ^ i
57
56
}
58
57
59
- impl T : Ord {
60
- pure fn lt ( & & other: T ) -> bool {
61
- return self < other;
58
+ #[ cfg( notest) ]
59
+ mod impls {
60
+ import cmp:: { Eq , Ord } ;
61
+
62
+ impl T : Ord {
63
+ pure fn lt ( & & other: T ) -> bool {
64
+ return self < other;
65
+ }
62
66
}
63
- }
64
67
65
- impl T : Eq {
66
- pure fn eq ( & & other: T ) -> bool {
67
- return self == other;
68
+ impl T : Eq {
69
+ pure fn eq ( & & other: T ) -> bool {
70
+ return self == other;
71
+ }
68
72
}
69
73
}
70
74
You can’t perform that action at this time.
0 commit comments