auto merge of #6942 : thestinger/rust/cleanup, r=catamorphism

borrowed pointers already implement Eq and Ord with deep comparisons
This commit is contained in:
bors
2013-06-04 17:55:34 -07:00
-14
View File
@@ -52,20 +52,6 @@ unsafe fn rust_upcall_fail(expr: *c_char,
}
}
/// Compares contents of two pointers using the default method.
/// Equivalent to `*x1 == *x2`. Useful for hashtables.
pub fn shape_eq<T:Eq>(x1: &T, x2: &T) -> bool {
*x1 == *x2
}
pub fn shape_lt<T:Ord>(x1: &T, x2: &T) -> bool {
*x1 < *x2
}
pub fn shape_le<T:Ord>(x1: &T, x2: &T) -> bool {
*x1 <= *x2
}
/**
* Returns a pointer to a type descriptor.
*