auto merge of #10066 : sanxiyn/rust/mut-ptr-clone, r=thestinger

This commit is contained in:
bors 2013-10-25 11:46:11 -07:00
commit 953e56052f

View file

@ -47,6 +47,13 @@ impl<T> Clone for *T {
}
}
impl<T> Clone for *mut T {
#[inline]
fn clone(&self) -> *mut T {
*self
}
}
/// Return the first offset `i` such that `f(buf[i]) == true`.
#[inline]
pub unsafe fn position<T>(buf: *T, f: &fn(&T) -> bool) -> uint {