Skip to content

Commit f0783ef

Browse files
committed
---
yaml --- r: 143679 b: refs/heads/try2 c: 88620c2 h: refs/heads/master i: 143677: 518688c 143675: 71e91e4 143671: cc0de39 143663: af0d5b0 143647: 2dd3395 143615: cf341c4 v: v3
1 parent 19c55b6 commit f0783ef

File tree

4 files changed

+50
-3
lines changed

4 files changed

+50
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8407ec9fedccdd410dee2bca67651ce245ed5cd3
8+
refs/heads/try2: 88620c25f5a2b5e17f3bff1e70ed2fbee97c2217
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/borrow.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,15 @@ impl<'self, T: Ord> Ord for &'self T {
5858
*(*self) > *(*other)
5959
}
6060
}
61+
62+
#[cfg(not(test))]
63+
impl<'self, T: TotalOrd> TotalOrd for &'self T {
64+
#[inline]
65+
fn cmp(&self, other: & &'self T) -> Ordering { (**self).cmp(*other) }
66+
}
67+
68+
#[cfg(not(test))]
69+
impl<'self, T: TotalEq> TotalEq for &'self T {
70+
#[inline]
71+
fn equals(&self, other: & &'self T) -> bool { (**self).equals(*other) }
72+
}

branches/try2/src/libstd/managed.rs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
use ptr::to_unsafe_ptr;
1414

15-
#[cfg(not(test))] use cmp::{Eq, Ord};
15+
#[cfg(not(test))] use cmp::*;
1616

1717
pub static RC_MANAGED_UNIQUE : uint = (-2) as uint;
1818
pub static RC_IMMORTAL : uint = 0x77777777;
@@ -71,6 +71,29 @@ impl<T:Ord> Ord for @mut T {
7171
fn gt(&self, other: &@mut T) -> bool { *(*self) > *(*other) }
7272
}
7373

74+
#[cfg(not(test))]
75+
impl<T: TotalOrd> TotalOrd for @T {
76+
#[inline]
77+
fn cmp(&self, other: &@T) -> Ordering { (**self).cmp(*other) }
78+
}
79+
80+
#[cfg(not(test))]
81+
impl<T: TotalOrd> TotalOrd for @mut T {
82+
#[inline]
83+
fn cmp(&self, other: &@mut T) -> Ordering { (**self).cmp(*other) }
84+
}
85+
86+
#[cfg(not(test))]
87+
impl<T: TotalEq> TotalEq for @T {
88+
#[inline]
89+
fn equals(&self, other: &@T) -> bool { (**self).equals(*other) }
90+
}
91+
92+
#[cfg(not(test))]
93+
impl<T: TotalEq> TotalEq for @mut T {
94+
#[inline]
95+
fn equals(&self, other: &@mut T) -> bool { (**self).equals(*other) }
96+
}
7497
#[test]
7598
fn test() {
7699
let x = @3;

branches/try2/src/libstd/owned.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations on unique pointer types
1212
13-
#[cfg(not(test))] use cmp::{Eq, Ord};
13+
#[cfg(not(test))] use cmp::*;
1414

1515
#[cfg(not(test))]
1616
impl<T:Eq> Eq for ~T {
@@ -31,3 +31,15 @@ impl<T:Ord> Ord for ~T {
3131
#[inline]
3232
fn gt(&self, other: &~T) -> bool { *(*self) > *(*other) }
3333
}
34+
35+
#[cfg(not(test))]
36+
impl<T: TotalOrd> TotalOrd for ~T {
37+
#[inline]
38+
fn cmp(&self, other: &~T) -> Ordering { (**self).cmp(*other) }
39+
}
40+
41+
#[cfg(not(test))]
42+
impl<T: TotalEq> TotalEq for ~T {
43+
#[inline]
44+
fn equals(&self, other: &~T) -> bool { (**self).equals(*other) }
45+
}

0 commit comments

Comments
 (0)