diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-12-30 17:49:00 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-01-03 14:02:00 -0800 |
| commit | b6e516859adc2eb0638a50677f73691f50ea9aca (patch) | |
| tree | 516a83ddc9ecadc3ad16b5caaaf7cd33b7080f2f /src/libstd/managed.rs | |
| parent | e095889e4edaa37ad78faa6394d0ac1d3650d64d (diff) | |
| download | rust-b6e516859adc2eb0638a50677f73691f50ea9aca.tar.gz rust-b6e516859adc2eb0638a50677f73691f50ea9aca.zip | |
libstd: Remove all support code related to `@mut`
Diffstat (limited to 'src/libstd/managed.rs')
| -rw-r--r-- | src/libstd/managed.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/libstd/managed.rs b/src/libstd/managed.rs index 7322f0b0647..c5705665896 100644 --- a/src/libstd/managed.rs +++ b/src/libstd/managed.rs @@ -31,13 +31,6 @@ pub fn ptr_eq<T>(a: @T, b: @T) -> bool { a_ptr == b_ptr } -/// Determine if two mutable shared boxes point to the same object -#[inline] -pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool { - let (a_ptr, b_ptr): (*T, *T) = (to_unsafe_ptr(&*a), to_unsafe_ptr(&*b)); - a_ptr == b_ptr -} - #[cfg(not(test))] impl<T:Eq> Eq for @T { #[inline] @@ -47,14 +40,6 @@ impl<T:Eq> Eq for @T { } #[cfg(not(test))] -impl<T:Eq> Eq for @mut T { - #[inline] - fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) } - #[inline] - fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) } -} - -#[cfg(not(test))] impl<T:Ord> Ord for @T { #[inline] fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) } @@ -67,40 +52,17 @@ impl<T:Ord> Ord for @T { } #[cfg(not(test))] -impl<T:Ord> Ord for @mut T { - #[inline] - fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) } - #[inline] - fn le(&self, other: &@mut T) -> bool { *(*self) <= *(*other) } - #[inline] - fn ge(&self, other: &@mut T) -> bool { *(*self) >= *(*other) } - #[inline] - fn gt(&self, other: &@mut T) -> bool { *(*self) > *(*other) } -} - -#[cfg(not(test))] impl<T: TotalOrd> TotalOrd for @T { #[inline] fn cmp(&self, other: &@T) -> Ordering { (**self).cmp(*other) } } #[cfg(not(test))] -impl<T: TotalOrd> TotalOrd for @mut T { - #[inline] - fn cmp(&self, other: &@mut T) -> Ordering { (**self).cmp(*other) } -} - -#[cfg(not(test))] impl<T: TotalEq> TotalEq for @T { #[inline] fn equals(&self, other: &@T) -> bool { (**self).equals(*other) } } -#[cfg(not(test))] -impl<T: TotalEq> TotalEq for @mut T { - #[inline] - fn equals(&self, other: &@mut T) -> bool { (**self).equals(*other) } -} #[test] fn test() { let x = @3; |
