diff options
Diffstat (limited to 'src/libstd/reference.rs')
| -rw-r--r-- | src/libstd/reference.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libstd/reference.rs b/src/libstd/reference.rs index 66df4334adc..91f03f02892 100644 --- a/src/libstd/reference.rs +++ b/src/libstd/reference.rs @@ -13,18 +13,6 @@ #[cfg(not(test))] use prelude::*; -/// Cast a region pointer - &T - to a uint. -#[inline] -pub fn to_uint<T>(thing: &T) -> uint { - thing as *T as uint -} - -/// Determine if two borrowed pointers point to the same thing. -#[inline] -pub fn ref_eq<'a, 'b, T>(thing: &'a T, other: &'b T) -> bool { - (thing as *T) == (other as *T) -} - // Equality for region pointers #[cfg(not(test))] impl<'a, T: Eq> Eq for &'a T { @@ -71,16 +59,3 @@ impl<'a, T: TotalEq> TotalEq for &'a T { fn equals(&self, other: & &'a T) -> bool { (**self).equals(*other) } } -#[cfg(test)] -mod tests { - use super::ref_eq; - - #[test] - fn test_ref_eq() { - let x = 1; - let y = 1; - - assert!(ref_eq(&x, &x)); - assert!(!ref_eq(&x, &y)); - } -} |
