diff options
Diffstat (limited to 'src/libstd/borrow.rs')
| -rw-r--r-- | src/libstd/borrow.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/borrow.rs b/src/libstd/borrow.rs index 9e3a3a28fe8..6c3d4c5f1fb 100644 --- a/src/libstd/borrow.rs +++ b/src/libstd/borrow.rs @@ -58,3 +58,15 @@ impl<'self, T: Ord> Ord for &'self T { *(*self) > *(*other) } } + +#[cfg(not(test))] +impl<'self, T: TotalOrd> TotalOrd for &'self T { + #[inline] + fn cmp(&self, other: & &'self T) -> Ordering { (**self).cmp(*other) } +} + +#[cfg(not(test))] +impl<'self, T: TotalEq> TotalEq for &'self T { + #[inline] + fn equals(&self, other: & &'self T) -> bool { (**self).equals(*other) } +} |
